]> git.lizzy.rs Git - rust.git/blob - tests/fail/stacked_borrows/issue-miri-1050-1.rs
pointer tag tracking: on creation, log the offsets it is created for
[rust.git] / tests / fail / stacked_borrows / issue-miri-1050-1.rs
1 // error-pattern: pointer to 4 bytes starting at offset 0 is out-of-bounds
2
3 fn main() {
4     unsafe {
5         let ptr = Box::into_raw(Box::new(0u16));
6         Box::from_raw(ptr as *mut u32);
7     }
8 }