rust/tests/compile-fail/validity/invalid_bool.rs
2020-03-02 13:51:08 +01:00

4 lines
122 B
Rust

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