1 // Regression test for https://github.com/rust-lang/miri/issues/2536
2 // This tests that we don't try to back too far up the stack when selecting a span to report.
3 // We should display the as_mut_ptr() call as the location of the invalidation, not the call to
11 let mut t = Thing { sli: &mut [0, 1, 2] };
12 let ptr = t.sli.as_ptr();
15 let _oof = *ptr; //~ ERROR: /read access .* tag does not exist in the borrow stack/
19 fn inner(t: &mut Thing) {
20 let _ = t.sli.as_mut_ptr();