rust/tests/compile-fail/validity/dangling_ref1.rs
2019-06-23 20:19:26 +02:00

6 lines
131 B
Rust

use std::mem;
fn main() {
let _x: &i32 = unsafe { mem::transmute(16usize) }; //~ ERROR integer pointer in non-ZST reference
}