rust/tests/compile-fail/validity/dangling_ref1.rs
2018-10-22 16:48:10 +02:00

6 lines
137 B
Rust

use std::mem;
fn main() {
let _x: &i32 = unsafe { mem::transmute(16usize) }; //~ ERROR tried to interpret some bytes as a pointer
}