+// Make sure we catch this even without validation
+// compile-flags: -Zmiri-disable-validation
+
// Make sure that we cannot load from memory a `&mut` that got already invalidated.
fn main() {
let x = &mut 42;
+// Make sure we catch this even without validation
+// compile-flags: -Zmiri-disable-validation
+
// Make sure that we cannot load from memory a `&` that got already invalidated.
fn main() {
let x = &mut 42;
-// This should fail even without validation
-// compile-flags: -Zmiri-disable-validation
+// This should fail even without validation or Stacked Borrows.
+// compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows
fn main() {
let x = [2u16, 3, 4]; // Make it big enough so we don't get an out-of-bounds error.
-// This should fail even without validation.
-// compile-flags: -Zmiri-disable-validation
+// This should fail even without validation or Stacked Borrows.
+// compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows
fn main() {
let x = [2u32, 3]; // Make it big enough so we don't get an out-of-bounds error.
-// This should fail even without validation.
-// compile-flags: -Zmiri-disable-validation
+// This should fail even without validation or Stacked Borrows.
+// compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows
fn main() {
let x = [2u16, 3, 4, 5]; // Make it big enough so we don't get an out-of-bounds error.
+// Make sure we catch this even without Stacked Borrows
+// compile-flags: -Zmiri-disable-stacked-borrows
use std::mem;
fn main() {
+// Make sure we catch this even without Stacked Borrows
+// compile-flags: -Zmiri-disable-stacked-borrows
use std::mem;
fn main() {
+// Make sure we catch this even without Stacked Borrows
+// compile-flags: -Zmiri-disable-stacked-borrows
use std::mem;
fn dangling() -> *const u8 {