]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/consts/ptr_comparisons.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / consts / ptr_comparisons.rs
index 0306a55af4e09bfa4139d67809d109e545e0229f..9b5fd18f818b0a0b071ddf98d62d6d68583b57f2 100644 (file)
@@ -1,6 +1,6 @@
 // compile-flags: --crate-type=lib
-// normalize-stderr-32bit: "offset 8" -> "offset $$TWO_WORDS"
-// normalize-stderr-64bit: "offset 16" -> "offset $$TWO_WORDS"
+// normalize-stderr-32bit: "8 bytes" -> "$$TWO_WORDS bytes"
+// normalize-stderr-64bit: "16 bytes" -> "$$TWO_WORDS bytes"
 // normalize-stderr-32bit: "size 4" -> "size $$WORD"
 // normalize-stderr-64bit: "size 8" -> "size $$WORD"
 
@@ -62,15 +62,15 @@ const _: *const usize = unsafe { (FOO as *const usize).offset(2) };
 
 const _: *const u8 =
     unsafe { std::ptr::addr_of!((*(FOO as *const usize as *const [u8; 1000]))[999]) };
-//~^ ERROR any use of this value will cause an error
-//~| WARN this was previously accepted by the compiler but is being phased out
+//~^ ERROR evaluation of constant value failed
+//~| out-of-bounds
 
 const _: usize = unsafe { std::mem::transmute::<*const usize, usize>(FOO) + 4 };
 //~^ ERROR any use of this value will cause an error
-//~| cannot cast pointer to integer
+//~| unable to turn pointer into raw bytes
 //~| WARN this was previously accepted by the compiler but is being phased out
 
 const _: usize = unsafe { *std::mem::transmute::<&&usize, &usize>(&FOO) + 4 };
 //~^ ERROR any use of this value will cause an error
-//~| cannot cast pointer to integer
+//~| unable to turn pointer into raw bytes
 //~| WARN this was previously accepted by the compiler but is being phased out