]> git.lizzy.rs Git - rust.git/blob - src/test/ui/thread-local/non-static.stderr
Rollup merge of #95365 - mkroening:hermit-alloc-error-handler, r=joshtriplett
[rust.git] / src / test / ui / thread-local / non-static.stderr
1 error: attribute should be applied to a static
2   --> $DIR/non-static.rs:4:1
3    |
4 LL | #[thread_local]
5    | ^^^^^^^^^^^^^^^
6 LL |
7 LL | const A: u32 = 0;
8    | ----------------- not a static
9
10 error: attribute should be applied to a static
11   --> $DIR/non-static.rs:8:1
12    |
13 LL |   #[thread_local]
14    |   ^^^^^^^^^^^^^^^
15 LL |
16 LL | / fn main() {
17 LL | |     #[thread_local] || {};
18 LL | |
19 LL | | }
20    | |_- not a static
21
22 error: attribute should be applied to a static
23   --> $DIR/non-static.rs:11:5
24    |
25 LL |     #[thread_local] || {};
26    |     ^^^^^^^^^^^^^^^ ----- not a static
27
28 error: attribute should be applied to a static
29   --> $DIR/non-static.rs:16:5
30    |
31 LL |     #[thread_local]
32    |     ^^^^^^^^^^^^^^^
33 LL |
34 LL |     a: String,
35    |     --------- not a static
36
37 error: aborting due to 4 previous errors
38