rust/tests/ui/thread-local/non-static.stderr
2025-12-20 15:38:42 +01:00

34 lines
950 B
Text

error: `#[thread_local]` attribute cannot be used on constants
--> $DIR/non-static.rs:4:1
|
LL | #[thread_local]
| ^^^^^^^^^^^^^^^
|
= help: `#[thread_local]` can be applied to foreign statics and statics
error: `#[thread_local]` attribute cannot be used on functions
--> $DIR/non-static.rs:8:1
|
LL | #[thread_local]
| ^^^^^^^^^^^^^^^
|
= help: `#[thread_local]` can be applied to foreign statics and statics
error: `#[thread_local]` attribute cannot be used on closures
--> $DIR/non-static.rs:11:5
|
LL | #[thread_local] || {};
| ^^^^^^^^^^^^^^^
|
= help: `#[thread_local]` can be applied to foreign statics and statics
error: `#[thread_local]` attribute cannot be used on struct fields
--> $DIR/non-static.rs:16:5
|
LL | #[thread_local]
| ^^^^^^^^^^^^^^^
|
= help: `#[thread_local]` can be applied to foreign statics and statics
error: aborting due to 4 previous errors