2018-10-12 03:54:37 -05:00
|
|
|
// Validation makes this fail in the wrong place
|
2018-10-24 10:17:44 -05:00
|
|
|
// compile-flags: -Zmiri-disable-validation
|
2018-10-12 03:54:37 -05:00
|
|
|
|
2018-08-24 12:18:21 -05:00
|
|
|
fn main() {
|
|
|
|
let b = unsafe { std::mem::transmute::<u8, bool>(2) };
|
2020-03-08 17:34:54 -05:00
|
|
|
let _x = b == true; //~ ERROR interpreting an invalid 8-bit value as a bool: 2
|
2018-08-24 12:18:21 -05:00
|
|
|
}
|