1 use std::cell::UnsafeCell;
4 let c = &UnsafeCell::new(UnsafeCell::new(0));
5 let inner_uniq = &mut *c.get();
6 let inner_shr = &*inner_uniq; // a SharedRW with a tag
7 *c.get() = UnsafeCell::new(1); // invalidates the SharedRW
8 let _val = *inner_shr.get(); //~ ERROR borrow stack
9 let _val = *inner_uniq.get();