rust/tests/ui/consts/miri_unleashed/box.rs
2023-01-11 09:32:08 +00:00

13 lines
296 B
Rust

// compile-flags: -Zunleash-the-miri-inside-of-you
#![feature(box_syntax)]
use std::mem::ManuallyDrop;
fn main() {}
static TEST_BAD: &mut i32 = {
&mut *(box 0)
//~^ ERROR could not evaluate static initializer
//~| NOTE calling non-const function `alloc::alloc::exchange_malloc`
};