rust/tests/compile-fail/invalid_bool.rs
Ralf Jung b7c57fee61 Ignore tests
the bool thing will be fixed by the validation I have planned, and we already ignored another test around modifing constants.
2018-07-26 11:21:49 +02:00

8 lines
289 B
Rust

//ignore-test FIXME (do some basic validation of invariants for all values in flight)
fn main() {
let b = unsafe { std::mem::transmute::<u8, bool>(2) };
if b { unreachable!() } else { unreachable!() } //~ ERROR constant evaluation error
//~^ NOTE invalid boolean value read
}