blob: 47998cf408c7c167c687f692f3c337c7f57d56c2 [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 dangling pointer
const Z3: i32 = unsafe { *(44 as *const i32) }; //~ ERROR dangling pointer