7 lines
151 B
Rust
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);
|
|
} }
|