1 // Validation makes this fail in the wrong place
2 // Make sure we find these even with many checks disabled.
3 // compile-flags: -Zmiri-disable-alignment-check -Zmiri-disable-stacked-borrows -Zmiri-disable-validation
5 fn dont_optimize<T>(x: T) -> T { x }
8 let b = unsafe { std::mem::transmute::<u8, bool>(2) };
9 let _x = b == dont_optimize(true); //~ ERROR interpreting an invalid 8-bit value as a bool: 0x02