Skip to content

Commit cf3c868

Browse files
committed
move exposed-provenance APIs into separate feature gate and explain the relationship of Exposed Provenance and Strict Provenance
1 parent 07cdf4d commit cf3c868

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

tests/fail/provenance/ptr_int_unexposed.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@compile-flags: -Zmiri-permissive-provenance
2-
#![feature(strict_provenance)]
2+
#![feature(strict_provenance, exposed_provenance)]
33

44
fn main() {
55
let x: i32 = 3;

tests/fail/provenance/ptr_invalid.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(strict_provenance)]
1+
#![feature(strict_provenance, exposed_provenance)]
22

33
// Ensure that a `ptr::invalid` ptr is truly invalid.
44
fn main() {

tests/fail/provenance/strict_provenance_cast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@compile-flags: -Zmiri-strict-provenance
2-
#![feature(strict_provenance)]
2+
#![feature(exposed_provenance)]
33

44
fn main() {
55
let addr = &0 as *const i32 as usize;

tests/fail/stacked_borrows/exposed_only_ro.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@compile-flags: -Zmiri-permissive-provenance
2-
#![feature(strict_provenance)]
2+
#![feature(exposed_provenance)]
33

44
// If we have only exposed read-only pointers, doing a write through a wildcard ptr should fail.
55

tests/pass/ptr_int_from_exposed.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@revisions: stack tree
22
//@[tree]compile-flags: -Zmiri-tree-borrows
33
//@compile-flags: -Zmiri-permissive-provenance
4-
#![feature(strict_provenance)]
4+
#![feature(strict_provenance, exposed_provenance)]
55

66
use std::ptr;
77

tests/pass/stacked-borrows/int-to-ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@compile-flags: -Zmiri-permissive-provenance
2-
#![feature(strict_provenance)]
2+
#![feature(exposed_provenance)]
33
use std::ptr;
44

55
// Just to make sure that casting a ref to raw, to int and back to raw

tests/pass/stacked-borrows/unknown-bottom-gc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@compile-flags: -Zmiri-permissive-provenance
2-
#![feature(strict_provenance)]
2+
#![feature(exposed_provenance)]
33

44
use std::ptr;
55

0 commit comments

Comments
 (0)