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