1 // Make sure we catch this even without Stacked Borrows
2 //@compile-flags: -Zmiri-disable-stacked-borrows
7 let ptr = (&val as *const i32).wrapping_offset(1);
8 let _x: &i32 = unsafe { mem::transmute(ptr) }; //~ ERROR: dangling reference (going beyond the bounds of its allocation)