rust/tests/ui/transmute/transmute-imut-to-mut.stderr
Nilstrieb 41e8d152dc Show number in error message even for one error
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00

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