blob: 648caae30b4275fdf4dedfeae2a3122d97a759f6 [file] [log] [blame]
// New test for #53818: modifying static memory at compile-time is not allowed.
// The test should never compile successfully
#![feature(const_raw_ptr_deref)]
use std::cell::UnsafeCell;
static mut FOO: u32 = 42;
static BOO: () = unsafe {
FOO = 5;
//~^ could not evaluate static initializer [E0080]
};
fn main() {}