about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-05-14 10:36:47 +0000
committerbors <bors@rust-lang.org>2022-05-14 10:36:47 +0000
commit8019fa0dc08bb0e26d28ce29c3983408ffb2feac (patch)
tree94beb20e5a5aaaa0cd40fc6f2bfadf9a7d1d6329 /src
parent17180f4a56aedfb5fa2daa0973c85784c361c339 (diff)
parentbd5fce65c60ae83f37d0a46bac4e09e9fd30b2c2 (diff)
downloadrust-8019fa0dc08bb0e26d28ce29c3983408ffb2feac.tar.gz
rust-8019fa0dc08bb0e26d28ce29c3983408ffb2feac.zip
Auto merge of #95826 - carbotaniuman:miri-permissive-provenance, r=RalfJung
Initial work on Miri permissive-exposed-provenance

Rustc portion of the changes for portions of a permissive ptr-to-int model for Miri. The main changes here are changing `ptr_get_alloc` and `get_alloc_id` to return an Option, and also making ptr-to-int casts have an expose side effect.
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/consts/miri_unleashed/ptr_arith.rs2
-rw-r--r--src/test/ui/consts/miri_unleashed/ptr_arith.stderr2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/ui/consts/miri_unleashed/ptr_arith.rs b/src/test/ui/consts/miri_unleashed/ptr_arith.rs
index 22314160c5e..2beb531cc68 100644
--- a/src/test/ui/consts/miri_unleashed/ptr_arith.rs
+++ b/src/test/ui/consts/miri_unleashed/ptr_arith.rs
@@ -14,7 +14,7 @@ static CMP: () = {
 static PTR_INT_CAST: () = {
     let x = &0 as *const _ as usize;
     //~^ ERROR could not evaluate static initializer
-    //~| unable to turn pointer into raw bytes
+    //~| "exposing pointers" needs an rfc before being allowed inside constants
     let _v = x == x;
 };
 
diff --git a/src/test/ui/consts/miri_unleashed/ptr_arith.stderr b/src/test/ui/consts/miri_unleashed/ptr_arith.stderr
index 2764d10348a..61d34e2e35d 100644
--- a/src/test/ui/consts/miri_unleashed/ptr_arith.stderr
+++ b/src/test/ui/consts/miri_unleashed/ptr_arith.stderr
@@ -8,7 +8,7 @@ error[E0080]: could not evaluate static initializer
   --> $DIR/ptr_arith.rs:15:13
    |
 LL |     let x = &0 as *const _ as usize;
-   |             ^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
+   |             ^^^^^^^^^^^^^^^^^^^^^^^ "exposing pointers" needs an rfc before being allowed inside constants
 
 error[E0080]: could not evaluate static initializer
   --> $DIR/ptr_arith.rs:23:14