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.
This commit is contained in:
commit
8019fa0dc0
12 changed files with 142 additions and 45 deletions
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue