File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
- fd61d06772d17c6242265d860fbfb5eafd282caa
1
+ 7f65393b9abf5e70d0b9a8080558f17c5625bd40
Original file line number Diff line number Diff line change 4
4
5
5
fn main ( ) {
6
6
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
8
8
}
Original file line number Diff line number Diff line change 3
3
// compile-flags: -Zmiri-disable-alignment-check -Zmiri-disable-stacked-borrows -Zmiri-disable-validation
4
4
5
5
fn 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
9
10
}
You can’t perform that action at this time.
0 commit comments