rust/tests/compile-fail/validity/dangling_ref1.rs
2019-07-23 23:25:06 +02:00

6 lines
138 B
Rust

use std::mem;
fn main() {
let _x: &i32 = unsafe { mem::transmute(16usize) }; //~ ERROR dangling reference (not entirely in bounds)
}