rust/tests/ui/linkage-attr/linkage-attr-mutable-static.stderr
bjorn3 07dc3ebf5c Allow static mut definitions with #[linkage]
Unlike static declarations with #[linkage], for definitions rustc
doesn't rewrite it to add an extra indirection.
2024-06-03 10:45:16 +00:00

11 lines
393 B
Plaintext

error: extern mutable statics are not allowed with `#[linkage]`
--> $DIR/linkage-attr-mutable-static.rs:9:9
|
LL | #[linkage = "extern_weak"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: marking the extern static mutable would allow changing which symbol the static references rather than make the target of the symbol mutable
error: aborting due to 1 previous error