rust/tests/compile-fail/stacked_borrows/issue-miri-1050-1.rs
2019-11-14 10:24:02 +01:00

7 lines
151 B
Rust

// error-pattern: pointer must be in-bounds
fn main() { unsafe {
let ptr = Box::into_raw(Box::new(0u16));
Box::from_raw(ptr as *mut u32);
} }