mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
41e8d152dc
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
11 lines
374 B
Plaintext
11 lines
374 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 1 previous error
|
|
|