blob: 15a17a25afefc9c54441d8f2d05683b5f74269d5 [file] [log] [blame]
// Validation/SB changes why we fail
//@compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows
//@error-in-other-file: /deallocating .*, which is stack variable memory, using Rust heap deallocation operation/
fn main() {
let x = 42;
let bad_box = unsafe { std::mem::transmute::<&i32, Box<i32>>(&x) };
drop(bad_box);
}