rust/tests/fail/validity/ptr_integer_transmute.rs
2022-06-01 10:53:38 -04:00

5 lines
135 B
Rust

fn main() {
let r = &mut 42;
let _i: usize = unsafe { std::mem::transmute(r) }; //~ ERROR expected plain (non-pointer) bytes
}