rust/tests/compile-fail/validity/invalid_bool.rs

4 lines
103 B
Rust

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