1 const REG_ADDR: *mut u8 = 0x5f3759df as *mut u8;
3 const VALUE: u8 = unsafe { *REG_ADDR };
4 //~^ ERROR dereferencing raw mutable pointers in constants is unstable
6 const unsafe fn unreachable() -> ! {
7 use std::convert::Infallible;
9 const INFALLIBLE: *mut Infallible = &[] as *const [Infallible] as *const _ as _;
11 //~^ ERROR dereferencing raw mutable pointers in constant functions is unstable
13 const BAD: () = unsafe { match *INFALLIBLE {} };
14 //~^ ERROR dereferencing raw mutable pointers in constants is unstable