]>
Commit | Line | Data |
---|---|---|
17df50a5 | 1 | #![feature(thread_local)] |
3b2f2976 XL |
2 | |
3 | #[thread_local] | |
4 | static A: u32 = 1; | |
5 | ||
6 | static B: u32 = A; | |
7 | //~^ ERROR thread-local statics cannot be accessed at compile-time | |
3b2f2976 XL |
8 | |
9 | static C: &u32 = &A; | |
10 | //~^ ERROR thread-local statics cannot be accessed at compile-time | |
11 | ||
12 | const D: u32 = A; | |
13 | //~^ ERROR thread-local statics cannot be accessed at compile-time | |
3b2f2976 XL |
14 | |
15 | const E: &u32 = &A; | |
16 | //~^ ERROR thread-local statics cannot be accessed at compile-time | |
17 | ||
18 | const fn f() -> u32 { | |
19 | A | |
20 | //~^ ERROR thread-local statics cannot be accessed at compile-time | |
3b2f2976 XL |
21 | } |
22 | ||
23 | fn main() {} |