rust/tests/ui/static/raw-ref-deref-without-unsafe.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
544 B
Plaintext
Raw Normal View History

error[E0133]: use of mutable static is unsafe and requires unsafe function or block
2024-08-17 07:19:34 -05:00
--> $DIR/raw-ref-deref-without-unsafe.rs:10:57
|
LL | static mut DEREF_BYTE_PTR: *mut u8 = ptr::addr_of_mut!(*BYTE_PTR);
| ^^^^^^^^ use of mutable static
|
= note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
2024-08-17 12:03:27 -05:00
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0133`.