rust/tests/fail/validity/ptr_integer_transmute.rs

5 lines
135 B
Rust
Raw Normal View History

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