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

4 lines
141 B
Rust
Raw Normal View History

fn main() {
2018-11-08 01:29:55 -06:00
let _b = unsafe { std::mem::transmute::<u8, bool>(2) }; //~ ERROR encountered 2, but expected something less or equal to 1
}