1 fn demo_mut_advanced_unique(our: &mut i32) -> i32 {
4 // This "re-asserts" uniqueness of the reference: After writing, we know
5 // our tag is at the top of the stack.
10 // We know this will return 5
14 // Now comes the evil context
17 static mut LEAK: *mut i32 = ptr::null_mut();
19 fn unknown_code_1(x: &i32) { unsafe {
20 LEAK = x as *const _ as *mut _;
23 fn unknown_code_2() { unsafe {
24 *LEAK = 7; //~ ERROR borrow stack
28 demo_mut_advanced_unique(&mut 0);