Skip to content

Commit

Permalink
Auto merge of #2487 - RalfJung:rustup, r=RalfJung
Browse files Browse the repository at this point in the history
rustup

Testing for nicer backtraces from rust-lang/rust#100501.
  • Loading branch information
bors committed Aug 14, 2022
2 parents 50ef22a + e70473d commit a000764
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
75b7e52e92c3b00fc891b47f5b2efdff0a2be55a
2fbc08e2ce64dee45a29cb6133da6b32366268aa
3 changes: 2 additions & 1 deletion tests/fail/provenance/strict_provenance_cast.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@compile-flags: -Zmiri-strict-provenance
#![feature(strict_provenance)]

fn main() {
let addr = &0 as *const i32 as usize;
let _ptr = addr as *const i32; //~ ERROR: integer-to-pointer casts and `ptr::from_exposed_addr` are not supported
let _ptr = std::ptr::from_exposed_addr::<i32>(addr); //~ ERROR: integer-to-pointer casts and `ptr::from_exposed_addr` are not supported
}
4 changes: 2 additions & 2 deletions tests/fail/provenance/strict_provenance_cast.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: unsupported operation: integer-to-pointer casts and `ptr::from_exposed_addr` are not supported with `-Zmiri-strict-provenance`
--> $DIR/strict_provenance_cast.rs:LL:CC
|
LL | let _ptr = addr as *const i32;
| ^^^^^^^^^^^^^^^^^^ integer-to-pointer casts and `ptr::from_exposed_addr` are not supported with `-Zmiri-strict-provenance`
LL | let _ptr = std::ptr::from_exposed_addr::<i32>(addr);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ integer-to-pointer casts and `ptr::from_exposed_addr` are not supported with `-Zmiri-strict-provenance`
|
= help: use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead
= note: backtrace:
Expand Down

0 comments on commit a000764

Please sign in to comment.