rust/tests/compile-fail/validity/invalid_bool.rs
2020-05-01 10:29:39 +02:00

4 lines
125 B
Rust

fn main() {
let _b = unsafe { std::mem::transmute::<u8, bool>(2) }; //~ ERROR encountered 0x02, but expected a boolean
}