rust/tests/compile-fail/zst.rs

5 lines
124 B
Rust
Raw Normal View History

fn main() {
let x = &() as *const () as *const i32;
let _ = unsafe { *x }; //~ ERROR outside bounds of allocation
}