2022-07-05 09:15:22 +00:00
|
|
|
//@error-pattern: pointer to 4 bytes starting at offset 0 is out-of-bounds
|
2019-11-14 10:23:29 +01:00
|
|
|
|
2022-06-21 11:27:44 -07:00
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
let ptr = Box::into_raw(Box::new(0u16));
|
|
|
|
Box::from_raw(ptr as *mut u32);
|
|
|
|
}
|
|
|
|
}
|