1 // We want to test that granting a SharedReadWrite will be added
2 // *below* an already granted SharedReadWrite -- so writing to
3 // the SharedReadWrite will invalidate the SharedReadWrite.
4 //@normalize-stderr-test: "0x[0-9a-fA-F]+" -> "$$HEX"
6 use std::cell::RefCell;
11 let x = &mut RefCell::new(0);
12 let y: &i32 = mem::transmute(&*x.borrow()); // launder lifetime
13 let shr_rw = &*x; // thanks to interior mutability this will be a SharedReadWrite
15 let _val = *y; //~ ERROR: /read access .* tag does not exist in the borrow stack/