blob: 1724a88dd3d9a7ca8b1b160e1593698b4a4871ec [file] [log] [blame] [edit]
const fn bool_cast(ptr: *const bool) { unsafe {
let _val = *ptr as u32; //~ERROR: evaluation of constant value failed
//~^ interpreting an invalid 8-bit value as a bool
}}
const _: () = {
let v = 3_u8;
bool_cast(&v as *const u8 as *const bool);
};
fn main() {}