1 //! This demonstrates a provenance problem that requires tracking of raw pointers to be detected.
5 let raw1 = &mut l as *mut _;
6 let raw2 = &mut l as *mut _; // invalidates raw1
7 // Without raw pointer tracking, Stacked Borrows cannot distinguish raw1 and raw2, and thus
8 // fails to realize that raw1 should not be used any more.
9 unsafe { *raw1 = 13 }; //~ ERROR: /write access .* tag does not exist in the borrow stack/
10 unsafe { *raw2 = 13 };