summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/miri_unleashed
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
commitd1b2d29528b7794b41e66fc2136e395a02f8529b (patch)
treea4a17504b260206dec3cf55b2dca82929a348ac2 /tests/ui/consts/miri_unleashed
parentReleasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz
rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/consts/miri_unleashed')
-rw-r--r--tests/ui/consts/miri_unleashed/ptr_arith.rs4
-rw-r--r--tests/ui/consts/miri_unleashed/ptr_arith.stderr2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/consts/miri_unleashed/ptr_arith.rs b/tests/ui/consts/miri_unleashed/ptr_arith.rs
index 4d12960b8..5cda3c411 100644
--- a/tests/ui/consts/miri_unleashed/ptr_arith.rs
+++ b/tests/ui/consts/miri_unleashed/ptr_arith.rs
@@ -1,5 +1,5 @@
// compile-flags: -Zunleash-the-miri-inside-of-you
-#![feature(core_intrinsics)]
+#![feature(core_intrinsics, pointer_byte_offsets)]
// During CTFE, we prevent pointer-to-int casts.
// Pointer comparisons are prevented in the trait system.
@@ -15,7 +15,7 @@ static PTR_INT_TRANSMUTE: () = unsafe {
let x: usize = std::mem::transmute(&0);
let _v = x + 0;
//~^ ERROR could not evaluate static initializer
- //~| unable to turn pointer into raw bytes
+ //~| unable to turn pointer into integer
};
// I'd love to test pointer comparison, but that is not possible since
diff --git a/tests/ui/consts/miri_unleashed/ptr_arith.stderr b/tests/ui/consts/miri_unleashed/ptr_arith.stderr
index 30fd3a55e..25ca6bc4e 100644
--- a/tests/ui/consts/miri_unleashed/ptr_arith.stderr
+++ b/tests/ui/consts/miri_unleashed/ptr_arith.stderr
@@ -8,7 +8,7 @@ error[E0080]: could not evaluate static initializer
--> $DIR/ptr_arith.rs:16:14
|
LL | let _v = x + 0;
- | ^ unable to turn pointer into raw bytes
+ | ^ unable to turn pointer into integer
|
= help: this code performed an operation that depends on the underlying bytes representing a pointer
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported