rust/tests/ui/transmute/transmute-imut-to-mut.stderr

11 lines
372 B
Plaintext
Raw Normal View History

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