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

4 lines
103 B
Rust
Raw Normal View History

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