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