]> git.lizzy.rs Git - rust.git/blob - src/test/ui/transmute/transmute-imut-to-mut.stderr
Rollup merge of #103521 - chenyukang:yukang/fix-103451-avoid-hang, r=jackh726,wesleywiser
[rust.git] / src / test / ui / transmute / transmute-imut-to-mut.stderr
1 error: transmuting &T to &mut T is undefined behavior, even if the reference is unused, consider instead using an UnsafeCell
2   --> $DIR/transmute-imut-to-mut.rs:6:32
3    |
4 LL |     let _a: &mut u8 = unsafe { transmute(&1u8) };
5    |                                ^^^^^^^^^
6    |
7    = note: `#[deny(mutable_transmutes)]` on by default
8
9 error: aborting due to previous error
10