blob: 7d51050f32b285b50e412ad126e78e969d4408b3 [file] [log] [blame]
//@compile-flags: -Zmiri-tree-borrows
fn main() {
// Since the "inside" part is `!Freeze`, the permission to mutate is gone.
let pair = ((), 1);
let x = &pair.0;
let ptr = (&raw const *x).cast::<i32>().cast_mut();
unsafe { ptr.write(0) }; //~ERROR: /write access .* forbidden/
}