move exposed-provenance APIs into separate feature gate and explain the relationship of Exposed Provenance and Strict Provenance

This commit is contained in:
Ralf Jung 2023-11-30 21:45:57 +01:00
parent 00796255c2
commit dbea549d80
11 changed files with 68 additions and 53 deletions

View file

@ -1,5 +1,5 @@
//@compile-flags: -Zmiri-permissive-provenance
#![feature(strict_provenance)]
#![feature(strict_provenance, exposed_provenance)]
fn main() {
let x: i32 = 3;

View file

@ -1,4 +1,4 @@
#![feature(strict_provenance)]
#![feature(strict_provenance, exposed_provenance)]
// Ensure that a `ptr::invalid` ptr is truly invalid.
fn main() {

View file

@ -1,5 +1,5 @@
//@compile-flags: -Zmiri-strict-provenance
#![feature(strict_provenance)]
#![feature(exposed_provenance)]
fn main() {
let addr = &0 as *const i32 as usize;

View file

@ -1,5 +1,5 @@
//@compile-flags: -Zmiri-permissive-provenance
#![feature(strict_provenance)]
#![feature(exposed_provenance)]
// If we have only exposed read-only pointers, doing a write through a wildcard ptr should fail.

View file

@ -1,7 +1,7 @@
//@revisions: stack tree
//@[tree]compile-flags: -Zmiri-tree-borrows
//@compile-flags: -Zmiri-permissive-provenance
#![feature(strict_provenance)]
#![feature(strict_provenance, exposed_provenance)]
use std::ptr;

View file

@ -1,5 +1,5 @@
//@compile-flags: -Zmiri-permissive-provenance
#![feature(strict_provenance)]
#![feature(exposed_provenance)]
use std::ptr;
// Just to make sure that casting a ref to raw, to int and back to raw

View file

@ -1,5 +1,5 @@
//@compile-flags: -Zmiri-permissive-provenance
#![feature(strict_provenance)]
#![feature(exposed_provenance)]
use std::ptr;