Skip to content

Commit e70473d

Browse files
committed
rustup
1 parent 50ef22a commit e70473d

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
75b7e52e92c3b00fc891b47f5b2efdff0a2be55a
1+
2fbc08e2ce64dee45a29cb6133da6b32366268aa
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@compile-flags: -Zmiri-strict-provenance
2+
#![feature(strict_provenance)]
23

34
fn main() {
45
let addr = &0 as *const i32 as usize;
5-
let _ptr = addr as *const i32; //~ ERROR: integer-to-pointer casts and `ptr::from_exposed_addr` are not supported
6+
let _ptr = std::ptr::from_exposed_addr::<i32>(addr); //~ ERROR: integer-to-pointer casts and `ptr::from_exposed_addr` are not supported
67
}

tests/fail/provenance/strict_provenance_cast.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error: unsupported operation: integer-to-pointer casts and `ptr::from_exposed_addr` are not supported with `-Zmiri-strict-provenance`
22
--> $DIR/strict_provenance_cast.rs:LL:CC
33
|
4-
LL | let _ptr = addr as *const i32;
5-
| ^^^^^^^^^^^^^^^^^^ integer-to-pointer casts and `ptr::from_exposed_addr` are not supported with `-Zmiri-strict-provenance`
4+
LL | let _ptr = std::ptr::from_exposed_addr::<i32>(addr);
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ integer-to-pointer casts and `ptr::from_exposed_addr` are not supported with `-Zmiri-strict-provenance`
66
|
77
= help: use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead
88
= note: backtrace:

0 commit comments

Comments
 (0)