rust/tests/ui/transmute/transmute-imut-to-mut.stderr
2023-01-11 09:32:08 +00:00

11 lines
372 B
Plaintext

error: transmuting &T to &mut T is undefined behavior, even if the reference is unused, consider instead using an UnsafeCell
--> $DIR/transmute-imut-to-mut.rs:6:32
|
LL | let _a: &mut u8 = unsafe { transmute(&1u8) };
| ^^^^^^^^^
|
= note: `#[deny(mutable_transmutes)]` on by default
error: aborting due to previous error