1 // This tests demonstrates the effect of 'Disabling' mutable references on reads, rather than
2 // removing them from the stack -- the latter would 'merge' neighboring SRW groups which we would
7 let base = &mut mem as *mut i32; // the base pointer we build the rest of the stack on
9 let mutref = &mut *base;
12 // In the stack, we now have [base, mutref, raw].
13 // We do this in a weird way where `mutref` is out of scope here, just in case
14 // Miri decides to get smart and argue that items for tags that are no longer
15 // used by any pointer stored anywhere in the machine can be removed.
17 // now mutref is disabled
19 // this should pop raw from the stack, since it is in a different SRW group
20 let _val = *raw; //~ERROR: that tag does not exist in the borrow stack