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

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

11 lines
374 B
Text
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 08:56:47 -07:00
--> $DIR/transmute-imut-to-mut.rs:6:32
2018-08-08 14:28:26 +02:00
|
LL | let _a: &mut u8 = unsafe { transmute(&1u8) };
| ^^^^^^^^^
|
= note: `#[deny(mutable_transmutes)]` on by default
2018-08-08 14:28:26 +02:00
error: aborting due to 1 previous error
2018-08-08 14:28:26 +02:00