rustup for fixed error messages
This commit is contained in:
parent
d606172f32
commit
dbd6403955
@ -1 +1 @@
|
||||
fd61d06772d17c6242265d860fbfb5eafd282caa
|
||||
7f65393b9abf5e70d0b9a8080558f17c5625bd40
|
||||
|
@ -4,5 +4,5 @@
|
||||
|
||||
fn main() {
|
||||
let b = unsafe { std::mem::transmute::<u8, bool>(2) };
|
||||
let _x = b == true; //~ ERROR interpreting an invalid 8-bit value as a bool
|
||||
let _x = b == true; //~ ERROR interpreting an invalid 8-bit value as a bool: 0x02
|
||||
}
|
||||
|
@ -3,7 +3,8 @@
|
||||
// compile-flags: -Zmiri-disable-alignment-check -Zmiri-disable-stacked-borrows -Zmiri-disable-validation
|
||||
|
||||
fn main() {
|
||||
assert!(std::char::from_u32(-1_i32 as u32).is_none());
|
||||
let c = unsafe { std::mem::transmute::<i32, char>(-1) };
|
||||
let _x = c == 'x'; //~ ERROR interpreting an invalid 32-bit value as a char
|
||||
let c = 0xFFFFFFu32;
|
||||
assert!(std::char::from_u32(c).is_none());
|
||||
let c = unsafe { std::mem::transmute::<u32, char>(c) };
|
||||
let _x = c == 'x'; //~ ERROR interpreting an invalid 32-bit value as a char: 0x00ffffff
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user