File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- fd61d06772d17c6242265d860fbfb5eafd282caa
1+ 7f65393b9abf5e70d0b9a8080558f17c5625bd40
Original file line number Diff line number Diff line change 44
55fn main ( ) {
66 let b = unsafe { std:: mem:: transmute :: < u8 , bool > ( 2 ) } ;
7- let _x = b == true ; //~ ERROR interpreting an invalid 8-bit value as a bool
7+ let _x = b == true ; //~ ERROR interpreting an invalid 8-bit value as a bool: 0x02
88}
Original file line number Diff line number Diff line change 33// compile-flags: -Zmiri-disable-alignment-check -Zmiri-disable-stacked-borrows -Zmiri-disable-validation
44
55fn main ( ) {
6- assert ! ( std:: char :: from_u32( -1_i32 as u32 ) . is_none( ) ) ;
7- let c = unsafe { std:: mem:: transmute :: < i32 , char > ( -1 ) } ;
8- let _x = c == 'x' ; //~ ERROR interpreting an invalid 32-bit value as a char
6+ let c = 0xFFFFFFu32 ;
7+ assert ! ( std:: char :: from_u32( c) . is_none( ) ) ;
8+ let c = unsafe { std:: mem:: transmute :: < u32 , char > ( c) } ;
9+ let _x = c == 'x' ; //~ ERROR interpreting an invalid 32-bit value as a char: 0x00ffffff
910}
You can’t perform that action at this time.
0 commit comments