blob: ec5508a1e90c9e30f4bd7a991bd206bbe20b6c0f [file] [log] [blame]
fn main() {}
// fine
const Z: i32 = unsafe { *(&1 as *const i32) };
// bad, will thus error in miri
const Z2: i32 = unsafe { *(42 as *const i32) }; //~ ERROR evaluation of constant value failed
//~| is a dangling pointer
const Z3: i32 = unsafe { *(44 as *const i32) }; //~ ERROR evaluation of constant value failed
//~| is a dangling pointer