Rustc changes for permissive provenance

This commit is contained in:
carbotaniuman 2022-05-13 12:30:25 -05:00
parent 0034bbca26
commit bd5fce65c6
12 changed files with 142 additions and 45 deletions

View file

@ -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;
};

View file

@ -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