rust/tests/ui/consts/miri_unleashed/box.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
264 B
Rust
Raw Normal View History

// compile-flags: -Zunleash-the-miri-inside-of-you
use std::mem::ManuallyDrop;
fn main() {}
2020-05-03 07:23:08 -05:00
static TEST_BAD: &mut i32 = {
&mut *(Box::new(0))
2020-04-29 02:53:22 -05:00
//~^ ERROR could not evaluate static initializer
//~| NOTE calling non-const function `Box::<i32>::new`
};