rust/tests/compile-fail/validity/invalid_bool.rs
2018-11-08 08:35:14 +01:00

4 lines
141 B
Rust

fn main() {
let _b = unsafe { std::mem::transmute::<u8, bool>(2) }; //~ ERROR encountered 2, but expected something less or equal to 1
}