summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/miri_unleashed
diff options
context:
space:
mode:
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