2023-12-07 11:56:48 +00:00
|
|
|
error[E0133]: use of mutable static is unsafe and requires unsafe function or block
|
2024-08-17 14:19:34 +02:00
|
|
|
--> $DIR/thread-local-static.rs:10:28
|
2023-12-07 11:56:48 +00:00
|
|
|
|
|
|
|
|
LL | std::mem::swap(x, &mut STATIC_VAR_2)
|
|
|
|
| ^^^^^^^^^^^^ use of mutable static
|
|
|
|
|
|
|
|
|
= note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
|
|
|
|
|
2021-06-01 13:59:17 +08:00
|
|
|
error[E0625]: thread-local statics cannot be accessed at compile-time
|
2024-08-17 14:19:34 +02:00
|
|
|
--> $DIR/thread-local-static.rs:10:28
|
2021-06-01 13:59:17 +08:00
|
|
|
|
|
|
|
|
LL | std::mem::swap(x, &mut STATIC_VAR_2)
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
2024-08-17 14:19:34 +02:00
|
|
|
error: aborting due to 2 previous errors
|
2021-06-01 13:59:17 +08:00
|
|
|
|
2024-08-17 14:19:34 +02:00
|
|
|
Some errors have detailed explanations: E0133, E0625.
|
2024-01-05 12:18:11 +01:00
|
|
|
For more information about an error, try `rustc --explain E0133`.
|