1 // Make sure that we cannot return a `&` that got already invalidated, not even in an `Option`.
2 fn foo(x: &mut (i32, i32)) -> Option<&i32> {
3 let xraw = x as *mut (i32, i32);
4 let ret = Some(unsafe { &(*xraw).1 });
5 unsafe { *xraw = (42, 23) }; // unfreeze
6 ret //~ ERROR: /retag .* tag does not exist in the borrow stack/
10 match foo(&mut (1, 2)) {