We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f85aa6 commit dc5f6d2Copy full SHA for dc5f6d2
compiler/rustc_error_codes/src/error_codes/E0625.md
@@ -1,5 +1,4 @@
1
-Static and const variables can refer to other const variables. But a const
2
-variable cannot refer to a thread-local static variable.
+A compile-time const variable is referring to a thread-local static variable.
3
4
Erroneous code example:
5
@@ -12,8 +11,10 @@ static X: usize = 12;
12
11
const Y: usize = 2 * X;
13
```
14
15
-In this example, `Y` cannot refer to `X`. To fix this, the value can be
16
-extracted as a const and then used:
+Static and const variables can refer to other const variables but a const
+variable cannot refer to a thread-local static variable. In this example,
+`Y` cannot refer to `X`. To fix this, the value can be extracted as a const
17
+and then used:
18
19
20
#![feature(thread_local)]
0 commit comments