]> git.lizzy.rs Git - rust.git/commitdiff
rustup for fixed error messages
authorRalf Jung <post@ralfj.de>
Sat, 2 May 2020 00:13:48 +0000 (02:13 +0200)
committerRalf Jung <post@ralfj.de>
Sat, 2 May 2020 00:13:48 +0000 (02:13 +0200)
rust-version
tests/compile-fail/invalid_bool.rs
tests/compile-fail/invalid_char.rs

index 7e957fa4257da3dd81ed9f07a1a6af1a2374f8f9..853c4ff103357b44e8d8a521eaab91c3388a2b36 100644 (file)
@@ -1 +1 @@
-fd61d06772d17c6242265d860fbfb5eafd282caa
+7f65393b9abf5e70d0b9a8080558f17c5625bd40
index 23441ea7d4aadb5ecdbde07c1512b6ec74223131..6dee9ec3c91a80fb85b1007a6339585c699e783c 100644 (file)
@@ -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
 }
index ab10ab1e2173dc266c5450e7dd0cbd569039e713..b240cb22ebe93e8e0549fe6a3ff6e3af86e6bf29 100644 (file)
@@ -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
 }