diff --git a/src/diagnostics.rs b/src/diagnostics.rs index c4f4d018f8e22..efe79269b565f 100644 --- a/src/diagnostics.rs +++ b/src/diagnostics.rs @@ -364,7 +364,9 @@ fn report_msg<'tcx>( if is_local && idx > 0 { err.span_note(frame_info.span, &frame_info.to_string()); } else { - err.note(&frame_info.to_string()); + let sm = sess.source_map(); + let span = sm.span_to_embeddable_string(frame_info.span); + err.note(format!("{frame_info} at {span}")); } } diff --git a/tests/fail/abort-terminator.stderr b/tests/fail/abort-terminator.stderr index ec9ce76685b55..2d3275f6b1901 100644 --- a/tests/fail/abort-terminator.stderr +++ b/tests/fail/abort-terminator.stderr @@ -10,7 +10,7 @@ LL | | } | |_^ the program aborted execution | = note: inside `panic_abort` at $DIR/abort-terminator.rs:LL:CC -note: inside `main` at $DIR/abort-terminator.rs:LL:CC +note: inside `main` --> $DIR/abort-terminator.rs:LL:CC | LL | panic_abort(); diff --git a/tests/fail/alloc/deallocate-bad-alignment.stderr b/tests/fail/alloc/deallocate-bad-alignment.stderr index 28439b54b2908..095eeeb79de7b 100644 --- a/tests/fail/alloc/deallocate-bad-alignment.stderr +++ b/tests/fail/alloc/deallocate-bad-alignment.stderr @@ -8,7 +8,7 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC -note: inside `main` at $DIR/deallocate-bad-alignment.rs:LL:CC +note: inside `main` --> $DIR/deallocate-bad-alignment.rs:LL:CC | LL | dealloc(x, Layout::from_size_align_unchecked(1, 2)); diff --git a/tests/fail/alloc/deallocate-bad-size.stderr b/tests/fail/alloc/deallocate-bad-size.stderr index a6ceab1f56f51..5fe93c841b22c 100644 --- a/tests/fail/alloc/deallocate-bad-size.stderr +++ b/tests/fail/alloc/deallocate-bad-size.stderr @@ -8,7 +8,7 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC -note: inside `main` at $DIR/deallocate-bad-size.rs:LL:CC +note: inside `main` --> $DIR/deallocate-bad-size.rs:LL:CC | LL | dealloc(x, Layout::from_size_align_unchecked(2, 1)); diff --git a/tests/fail/alloc/deallocate-twice.stderr b/tests/fail/alloc/deallocate-twice.stderr index b6c5b6f97ee7b..fa7a74ee13cfe 100644 --- a/tests/fail/alloc/deallocate-twice.stderr +++ b/tests/fail/alloc/deallocate-twice.stderr @@ -8,7 +8,7 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC -note: inside `main` at $DIR/deallocate-twice.rs:LL:CC +note: inside `main` --> $DIR/deallocate-twice.rs:LL:CC | LL | dealloc(x, Layout::from_size_align_unchecked(1, 1)); diff --git a/tests/fail/alloc/global_system_mixup.stderr b/tests/fail/alloc/global_system_mixup.stderr index 4ee85add6c228..62ffb8142a3fb 100644 --- a/tests/fail/alloc/global_system_mixup.stderr +++ b/tests/fail/alloc/global_system_mixup.stderr @@ -9,7 +9,7 @@ LL | FREE(); = note: BACKTRACE: = note: inside `std::sys::PLATFORM::alloc::::dealloc` at RUSTLIB/std/src/sys/PLATFORM/alloc.rs:LL:CC = note: inside `::deallocate` at RUSTLIB/std/src/alloc.rs:LL:CC -note: inside `main` at $DIR/global_system_mixup.rs:LL:CC +note: inside `main` --> $DIR/global_system_mixup.rs:LL:CC | LL | System.deallocate(ptr, l); diff --git a/tests/fail/alloc/reallocate-bad-size.stderr b/tests/fail/alloc/reallocate-bad-size.stderr index c11b5a851048f..24cabb395649c 100644 --- a/tests/fail/alloc/reallocate-bad-size.stderr +++ b/tests/fail/alloc/reallocate-bad-size.stderr @@ -8,7 +8,7 @@ LL | unsafe { __rust_realloc(ptr, layout.size(), layout.align(), new_size) } = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside `std::alloc::realloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC -note: inside `main` at $DIR/reallocate-bad-size.rs:LL:CC +note: inside `main` --> $DIR/reallocate-bad-size.rs:LL:CC | LL | let _y = realloc(x, Layout::from_size_align_unchecked(2, 1), 1); diff --git a/tests/fail/alloc/reallocate-dangling.stderr b/tests/fail/alloc/reallocate-dangling.stderr index c7db5a729048c..b1460bfb763ee 100644 --- a/tests/fail/alloc/reallocate-dangling.stderr +++ b/tests/fail/alloc/reallocate-dangling.stderr @@ -8,7 +8,7 @@ LL | unsafe { __rust_realloc(ptr, layout.size(), layout.align(), new_size) } = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside `std::alloc::realloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC -note: inside `main` at $DIR/reallocate-dangling.rs:LL:CC +note: inside `main` --> $DIR/reallocate-dangling.rs:LL:CC | LL | let _z = realloc(x, Layout::from_size_align_unchecked(1, 1), 1); diff --git a/tests/fail/alloc/stack_free.stderr b/tests/fail/alloc/stack_free.stderr index 44991542b1350..b1636050a78ca 100644 --- a/tests/fail/alloc/stack_free.stderr +++ b/tests/fail/alloc/stack_free.stderr @@ -12,7 +12,7 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } = note: inside `alloc::alloc::box_free::` at RUSTLIB/alloc/src/alloc.rs:LL:CC = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside `main` at $DIR/stack_free.rs:LL:CC +note: inside `main` --> $DIR/stack_free.rs:LL:CC | LL | drop(bad_box); diff --git a/tests/fail/box-cell-alias.stderr b/tests/fail/box-cell-alias.stderr index 8370163997687..f57b52c4bda7a 100644 --- a/tests/fail/box-cell-alias.stderr +++ b/tests/fail/box-cell-alias.stderr @@ -21,7 +21,7 @@ LL | let res = helper(val, ptr); | ^^^ = note: BACKTRACE: = note: inside `helper` at $DIR/box-cell-alias.rs:LL:CC -note: inside `main` at $DIR/box-cell-alias.rs:LL:CC +note: inside `main` --> $DIR/box-cell-alias.rs:LL:CC | LL | let res = helper(val, ptr); diff --git a/tests/fail/concurrency/windows_join_detached.stderr b/tests/fail/concurrency/windows_join_detached.stderr index 20f34cf104d63..7b297b260d87a 100644 --- a/tests/fail/concurrency/windows_join_detached.stderr +++ b/tests/fail/concurrency/windows_join_detached.stderr @@ -10,7 +10,7 @@ LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle( = note: inside `std::sys::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/PLATFORM/thread.rs:LL:CC = note: inside `std::thread::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC -note: inside `main` at $DIR/windows_join_detached.rs:LL:CC +note: inside `main` --> $DIR/windows_join_detached.rs:LL:CC | LL | thread.join().unwrap(); diff --git a/tests/fail/crates/tokio_mvp.stderr b/tests/fail/crates/tokio_mvp.stderr index 5a80d1ac5a9b1..1e7dfaa749904 100644 --- a/tests/fail/crates/tokio_mvp.stderr +++ b/tests/fail/crates/tokio_mvp.stderr @@ -6,7 +6,7 @@ LL | let res = syscall!(epoll_create1(libc::EPOLL_CLOEXEC)); | = help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support = note: BACKTRACE: -note: inside `main` at $DIR/tokio_mvp.rs:LL:CC +note: inside `main` --> $DIR/tokio_mvp.rs:LL:CC | LL | #[tokio::main] diff --git a/tests/fail/dangling_pointers/storage_dead_dangling.stderr b/tests/fail/dangling_pointers/storage_dead_dangling.stderr index 72e5f20f924a4..2ba8116cadc24 100644 --- a/tests/fail/dangling_pointers/storage_dead_dangling.stderr +++ b/tests/fail/dangling_pointers/storage_dead_dangling.stderr @@ -8,7 +8,7 @@ LL | unsafe { &mut *(LEAK as *mut i32) }; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside `evil` at $DIR/storage_dead_dangling.rs:LL:CC -note: inside `main` at $DIR/storage_dead_dangling.rs:LL:CC +note: inside `main` --> $DIR/storage_dead_dangling.rs:LL:CC | LL | evil(); diff --git a/tests/fail/data_race/stack_pop_race.stderr b/tests/fail/data_race/stack_pop_race.stderr index 5de27108ab633..0075f877b29dc 100644 --- a/tests/fail/data_race/stack_pop_race.stderr +++ b/tests/fail/data_race/stack_pop_race.stderr @@ -8,7 +8,7 @@ LL | } = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside `race` at $DIR/stack_pop_race.rs:LL:CC -note: inside `main` at $DIR/stack_pop_race.rs:LL:CC +note: inside `main` --> $DIR/stack_pop_race.rs:LL:CC | LL | race(0); diff --git a/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr b/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr index 7d9302e3e3adc..484f703f9c1b5 100644 --- a/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr +++ b/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr @@ -11,7 +11,7 @@ LL | | } | |_^ the program aborted execution | = note: inside `nounwind` at $DIR/exported_symbol_bad_unwind2.rs:LL:CC -note: inside `main` at $DIR/exported_symbol_bad_unwind2.rs:LL:CC +note: inside `main` --> $DIR/exported_symbol_bad_unwind2.rs:LL:CC | LL | unsafe { nounwind() } diff --git a/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr b/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr index 7d9302e3e3adc..484f703f9c1b5 100644 --- a/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr +++ b/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr @@ -11,7 +11,7 @@ LL | | } | |_^ the program aborted execution | = note: inside `nounwind` at $DIR/exported_symbol_bad_unwind2.rs:LL:CC -note: inside `main` at $DIR/exported_symbol_bad_unwind2.rs:LL:CC +note: inside `main` --> $DIR/exported_symbol_bad_unwind2.rs:LL:CC | LL | unsafe { nounwind() } diff --git a/tests/fail/generator-pinned-moved.stderr b/tests/fail/generator-pinned-moved.stderr index 4f73671a78947..80c5794736a9f 100644 --- a/tests/fail/generator-pinned-moved.stderr +++ b/tests/fail/generator-pinned-moved.stderr @@ -8,13 +8,13 @@ LL | *num += 1; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside closure at $DIR/generator-pinned-moved.rs:LL:CC -note: inside ` as std::iter::Iterator>::next` at $DIR/generator-pinned-moved.rs:LL:CC +note: inside ` as std::iter::Iterator>::next` --> $DIR/generator-pinned-moved.rs:LL:CC | LL | match me.resume(()) { | ^^^^^^^^^^^^^ = note: inside `> as std::iter::Iterator>::next` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `main` at $DIR/generator-pinned-moved.rs:LL:CC +note: inside `main` --> $DIR/generator-pinned-moved.rs:LL:CC | LL | generator_iterator_2.next(); // and use moved value diff --git a/tests/fail/intrinsics/simd-float-to-int.stderr b/tests/fail/intrinsics/simd-float-to-int.stderr index 36bb9643b48d4..5c73c76a1613d 100644 --- a/tests/fail/intrinsics/simd-float-to-int.stderr +++ b/tests/fail/intrinsics/simd-float-to-int.stderr @@ -8,7 +8,7 @@ LL | unsafe { intrinsics::simd_cast(self) } = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside `std::simd::Simd::::to_int_unchecked::` at RUSTLIB/core/src/../../portable-simd/crates/core_simd/src/vector.rs:LL:CC -note: inside `main` at $DIR/simd-float-to-int.rs:LL:CC +note: inside `main` --> $DIR/simd-float-to-int.rs:LL:CC | LL | let _x: i32x2 = f32x2::from_array([f32::MAX, f32::MIN]).to_int_unchecked(); diff --git a/tests/fail/intrinsics/simd-gather.stderr b/tests/fail/intrinsics/simd-gather.stderr index 29a4ef65705ab..7512d57f6720e 100644 --- a/tests/fail/intrinsics/simd-gather.stderr +++ b/tests/fail/intrinsics/simd-gather.stderr @@ -8,7 +8,7 @@ LL | unsafe { intrinsics::simd_gather(or, ptrs, enable.to_int()) } = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside `std::simd::Simd::::gather_select_unchecked` at RUSTLIB/core/src/../../portable-simd/crates/core_simd/src/vector.rs:LL:CC -note: inside `main` at $DIR/simd-gather.rs:LL:CC +note: inside `main` --> $DIR/simd-gather.rs:LL:CC | LL | let _result = Simd::gather_select_unchecked(&vec, Mask::splat(true), idxs, Simd::splat(0)); diff --git a/tests/fail/intrinsics/simd-scatter.stderr b/tests/fail/intrinsics/simd-scatter.stderr index fde85a63503b6..a9ad60a0e5be2 100644 --- a/tests/fail/intrinsics/simd-scatter.stderr +++ b/tests/fail/intrinsics/simd-scatter.stderr @@ -8,7 +8,7 @@ LL | intrinsics::simd_scatter(self, ptrs, enable.to_int()) = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside `std::simd::Simd::::scatter_select_unchecked` at RUSTLIB/core/src/../../portable-simd/crates/core_simd/src/vector.rs:LL:CC -note: inside `main` at $DIR/simd-scatter.rs:LL:CC +note: inside `main` --> $DIR/simd-scatter.rs:LL:CC | LL | / Simd::from_array([-27, 82, -41, 124]).scatter_select_unchecked( diff --git a/tests/fail/issue-miri-1112.stderr b/tests/fail/issue-miri-1112.stderr index e6644a72849ff..f1cb50ab9be78 100644 --- a/tests/fail/issue-miri-1112.stderr +++ b/tests/fail/issue-miri-1112.stderr @@ -8,7 +8,7 @@ LL | let obj = std::mem::transmute::(obj) = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside `FunnyPointer::from_data_ptr` at $DIR/issue-miri-1112.rs:LL:CC -note: inside `main` at $DIR/issue-miri-1112.rs:LL:CC +note: inside `main` --> $DIR/issue-miri-1112.rs:LL:CC | LL | let _raw: &FunnyPointer = FunnyPointer::from_data_ptr(&hello, &meta as *const _); diff --git a/tests/fail/never_transmute_void.stderr b/tests/fail/never_transmute_void.stderr index 4c3a3d075f028..413172b25464a 100644 --- a/tests/fail/never_transmute_void.stderr +++ b/tests/fail/never_transmute_void.stderr @@ -8,7 +8,7 @@ LL | match v.0 {} = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside `m::f` at $DIR/never_transmute_void.rs:LL:CC -note: inside `main` at $DIR/never_transmute_void.rs:LL:CC +note: inside `main` --> $DIR/never_transmute_void.rs:LL:CC | LL | m::f(v); diff --git a/tests/fail/panic/bad_unwind.stderr b/tests/fail/panic/bad_unwind.stderr index 23c33f5e7f3ff..5d7f01f478656 100644 --- a/tests/fail/panic/bad_unwind.stderr +++ b/tests/fail/panic/bad_unwind.stderr @@ -13,7 +13,7 @@ LL | std::panic::catch_unwind(|| unwind()).unwrap_err(); = note: inside `std::panicking::r#try::do_call::<[closure@$DIR/bad_unwind.rs:LL:CC], ()>` at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside `std::panicking::r#try::<(), [closure@$DIR/bad_unwind.rs:LL:CC]>` at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside `std::panic::catch_unwind::<[closure@$DIR/bad_unwind.rs:LL:CC], ()>` at RUSTLIB/std/src/panic.rs:LL:CC -note: inside `main` at $DIR/bad_unwind.rs:LL:CC +note: inside `main` --> $DIR/bad_unwind.rs:LL:CC | LL | std::panic::catch_unwind(|| unwind()).unwrap_err(); diff --git a/tests/fail/panic/double_panic.stderr b/tests/fail/panic/double_panic.stderr index f1d2b4de97cc2..6bf13f2160150 100644 --- a/tests/fail/panic/double_panic.stderr +++ b/tests/fail/panic/double_panic.stderr @@ -75,13 +75,13 @@ LL | ABORT(); = note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::rt::begin_panic<&str>::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC -note: inside `::drop` at RUSTLIB/std/src/panic.rs:LL:CC +note: inside `::drop` --> $DIR/double_panic.rs:LL:CC | LL | panic!("second"); | ^ = note: inside `std::ptr::drop_in_place:: - shim(Some(Foo))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC -note: inside `main` at $DIR/double_panic.rs:LL:CC +note: inside `main` --> $DIR/double_panic.rs:LL:CC | LL | } diff --git a/tests/fail/panic/no_std.stderr b/tests/fail/panic/no_std.stderr index 568b286e1d3bf..39ad0d268b94e 100644 --- a/tests/fail/panic/no_std.stderr +++ b/tests/fail/panic/no_std.stderr @@ -6,7 +6,7 @@ LL | core::intrinsics::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ the program aborted execution | = note: inside `panic_handler` at $DIR/no_std.rs:LL:CC -note: inside `start` at RUSTLIB/core/src/panic.rs:LL:CC +note: inside `start` --> $DIR/no_std.rs:LL:CC | LL | panic!("blarg I am dead") diff --git a/tests/fail/panic/panic_abort1.stderr b/tests/fail/panic/panic_abort1.stderr index 7547199454643..d25dd7be63596 100644 --- a/tests/fail/panic/panic_abort1.stderr +++ b/tests/fail/panic/panic_abort1.stderr @@ -12,7 +12,7 @@ LL | ABORT(); = note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::rt::begin_panic<&str>::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC -note: inside `main` at RUSTLIB/std/src/panic.rs:LL:CC +note: inside `main` --> $DIR/panic_abort1.rs:LL:CC | LL | std::panic!("panicking from libstd"); diff --git a/tests/fail/panic/panic_abort2.stderr b/tests/fail/panic/panic_abort2.stderr index 2fdf889d798a2..f56d509a697b4 100644 --- a/tests/fail/panic/panic_abort2.stderr +++ b/tests/fail/panic/panic_abort2.stderr @@ -13,7 +13,7 @@ LL | ABORT(); = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::panicking::begin_panic_handler::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC = note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC -note: inside `main` at RUSTLIB/std/src/panic.rs:LL:CC +note: inside `main` --> $DIR/panic_abort2.rs:LL:CC | LL | std::panic!("{}-panicking from libstd", 42); diff --git a/tests/fail/panic/panic_abort3.stderr b/tests/fail/panic/panic_abort3.stderr index 8704b0d940b7a..43792f769930b 100644 --- a/tests/fail/panic/panic_abort3.stderr +++ b/tests/fail/panic/panic_abort3.stderr @@ -13,7 +13,7 @@ LL | ABORT(); = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::panicking::begin_panic_handler::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC = note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC -note: inside `main` at RUSTLIB/core/src/panic.rs:LL:CC +note: inside `main` --> $DIR/panic_abort3.rs:LL:CC | LL | core::panic!("panicking from libcore"); diff --git a/tests/fail/panic/panic_abort4.stderr b/tests/fail/panic/panic_abort4.stderr index 1d75d72c0317c..89e181bfb276c 100644 --- a/tests/fail/panic/panic_abort4.stderr +++ b/tests/fail/panic/panic_abort4.stderr @@ -13,7 +13,7 @@ LL | ABORT(); = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<[closure@std::panicking::begin_panic_handler::{closure#0}], !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC = note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC -note: inside `main` at RUSTLIB/core/src/panic.rs:LL:CC +note: inside `main` --> $DIR/panic_abort4.rs:LL:CC | LL | core::panic!("{}-panicking from libcore", 42); diff --git a/tests/fail/provenance/provenance_transmute.stderr b/tests/fail/provenance/provenance_transmute.stderr index f7c5f6046e198..042d8cd4afe79 100644 --- a/tests/fail/provenance/provenance_transmute.stderr +++ b/tests/fail/provenance/provenance_transmute.stderr @@ -8,7 +8,7 @@ LL | let _val = *left_ptr; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside `deref` at $DIR/provenance_transmute.rs:LL:CC -note: inside `main` at $DIR/provenance_transmute.rs:LL:CC +note: inside `main` --> $DIR/provenance_transmute.rs:LL:CC | LL | deref(ptr1, ptr2.with_addr(ptr1.addr())); diff --git a/tests/fail/shims/fs/isolated_file.stderr b/tests/fail/shims/fs/isolated_file.stderr index 269b1383aad68..2385439c8a5f7 100644 --- a/tests/fail/shims/fs/isolated_file.stderr +++ b/tests/fail/shims/fs/isolated_file.stderr @@ -17,7 +17,7 @@ LL | let fd = cvt_r(|| unsafe { open64(path.as_ptr(), flags, opts.mode a = note: inside `std::fs::OpenOptions::_open` at RUSTLIB/std/src/fs.rs:LL:CC = note: inside `std::fs::OpenOptions::open::<&std::path::Path>` at RUSTLIB/std/src/fs.rs:LL:CC = note: inside `std::fs::File::open::<&str>` at RUSTLIB/std/src/fs.rs:LL:CC -note: inside `main` at $DIR/isolated_file.rs:LL:CC +note: inside `main` --> $DIR/isolated_file.rs:LL:CC | LL | let _file = std::fs::File::open("file.txt").unwrap(); diff --git a/tests/fail/shims/fs/mkstemp_immutable_arg.stderr b/tests/fail/shims/fs/mkstemp_immutable_arg.stderr index 414ac1cb1b702..35ff1926b0657 100644 --- a/tests/fail/shims/fs/mkstemp_immutable_arg.stderr +++ b/tests/fail/shims/fs/mkstemp_immutable_arg.stderr @@ -8,7 +8,7 @@ LL | let _fd = unsafe { libc::mkstemp(s) }; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside `test_mkstemp_immutable_arg` at $DIR/mkstemp_immutable_arg.rs:LL:CC -note: inside `main` at $DIR/mkstemp_immutable_arg.rs:LL:CC +note: inside `main` --> $DIR/mkstemp_immutable_arg.rs:LL:CC | LL | test_mkstemp_immutable_arg(); diff --git a/tests/fail/shims/fs/unix_open_missing_required_mode.stderr b/tests/fail/shims/fs/unix_open_missing_required_mode.stderr index 38d033b494554..5a8e7352c7686 100644 --- a/tests/fail/shims/fs/unix_open_missing_required_mode.stderr +++ b/tests/fail/shims/fs/unix_open_missing_required_mode.stderr @@ -8,7 +8,7 @@ LL | ...safe { libc::open(name_ptr, libc::O_CREAT) }; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside `test_file_open_missing_needed_mode` at $DIR/unix_open_missing_required_mode.rs:LL:CC -note: inside `main` at $DIR/unix_open_missing_required_mode.rs:LL:CC +note: inside `main` --> $DIR/unix_open_missing_required_mode.rs:LL:CC | LL | test_file_open_missing_needed_mode(); diff --git a/tests/fail/should-pass/cpp20_rwc_syncs.stderr b/tests/fail/should-pass/cpp20_rwc_syncs.stderr index 8a24b085a99f6..325565fa1e786 100644 --- a/tests/fail/should-pass/cpp20_rwc_syncs.stderr +++ b/tests/fail/should-pass/cpp20_rwc_syncs.stderr @@ -8,7 +8,7 @@ LL | std::hint::unreachable_unchecked(); = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside `test_cpp20_rwc_syncs` at $DIR/cpp20_rwc_syncs.rs:LL:CC -note: inside `main` at $DIR/cpp20_rwc_syncs.rs:LL:CC +note: inside `main` --> $DIR/cpp20_rwc_syncs.rs:LL:CC | LL | test_cpp20_rwc_syncs(); diff --git a/tests/fail/stacked_borrows/aliasing_mut1.stderr b/tests/fail/stacked_borrows/aliasing_mut1.stderr index 268d253ad5b06..4514abb4ab2e4 100644 --- a/tests/fail/stacked_borrows/aliasing_mut1.stderr +++ b/tests/fail/stacked_borrows/aliasing_mut1.stderr @@ -18,7 +18,7 @@ LL | pub fn safe(_x: &mut i32, _y: &mut i32) {} | ^^ = note: BACKTRACE: = note: inside `safe` at $DIR/aliasing_mut1.rs:LL:CC -note: inside `main` at $DIR/aliasing_mut1.rs:LL:CC +note: inside `main` --> $DIR/aliasing_mut1.rs:LL:CC | LL | safe_raw(xraw, xraw); diff --git a/tests/fail/stacked_borrows/aliasing_mut2.stderr b/tests/fail/stacked_borrows/aliasing_mut2.stderr index 77a542f45a256..9ca9743cbd929 100644 --- a/tests/fail/stacked_borrows/aliasing_mut2.stderr +++ b/tests/fail/stacked_borrows/aliasing_mut2.stderr @@ -18,7 +18,7 @@ LL | pub fn safe(_x: &i32, _y: &mut i32) {} | ^^ = note: BACKTRACE: = note: inside `safe` at $DIR/aliasing_mut2.rs:LL:CC -note: inside `main` at $DIR/aliasing_mut2.rs:LL:CC +note: inside `main` --> $DIR/aliasing_mut2.rs:LL:CC | LL | safe_raw(xshr, xraw); diff --git a/tests/fail/stacked_borrows/aliasing_mut3.stderr b/tests/fail/stacked_borrows/aliasing_mut3.stderr index eb6b01fc6b12b..b504097a3c91f 100644 --- a/tests/fail/stacked_borrows/aliasing_mut3.stderr +++ b/tests/fail/stacked_borrows/aliasing_mut3.stderr @@ -21,7 +21,7 @@ LL | safe_raw(xraw, xshr); | ^^^^^^^^^^^^^^^^^^^^ = note: BACKTRACE: = note: inside `safe` at $DIR/aliasing_mut3.rs:LL:CC -note: inside `main` at $DIR/aliasing_mut3.rs:LL:CC +note: inside `main` --> $DIR/aliasing_mut3.rs:LL:CC | LL | safe_raw(xraw, xshr); diff --git a/tests/fail/stacked_borrows/aliasing_mut4.stderr b/tests/fail/stacked_borrows/aliasing_mut4.stderr index e592b154a7326..6fe0d70902930 100644 --- a/tests/fail/stacked_borrows/aliasing_mut4.stderr +++ b/tests/fail/stacked_borrows/aliasing_mut4.stderr @@ -18,7 +18,7 @@ LL | pub fn safe(_x: &i32, _y: &mut Cell) {} | ^^ = note: BACKTRACE: = note: inside `safe` at $DIR/aliasing_mut4.rs:LL:CC -note: inside `main` at $DIR/aliasing_mut4.rs:LL:CC +note: inside `main` --> $DIR/aliasing_mut4.rs:LL:CC | LL | safe_raw(xshr, xraw as *mut _); diff --git a/tests/fail/stacked_borrows/box_exclusive_violation1.stderr b/tests/fail/stacked_borrows/box_exclusive_violation1.stderr index d82b8342f1231..f114130f6fafd 100644 --- a/tests/fail/stacked_borrows/box_exclusive_violation1.stderr +++ b/tests/fail/stacked_borrows/box_exclusive_violation1.stderr @@ -21,12 +21,12 @@ LL | *our = 5; | ^^^^^^^^ = note: BACKTRACE: = note: inside `unknown_code_2` at $DIR/box_exclusive_violation1.rs:LL:CC -note: inside `demo_box_advanced_unique` at $DIR/box_exclusive_violation1.rs:LL:CC +note: inside `demo_box_advanced_unique` --> $DIR/box_exclusive_violation1.rs:LL:CC | LL | unknown_code_2(); | ^^^^^^^^^^^^^^^^ -note: inside `main` at $DIR/box_exclusive_violation1.rs:LL:CC +note: inside `main` --> $DIR/box_exclusive_violation1.rs:LL:CC | LL | demo_box_advanced_unique(Box::new(0)); diff --git a/tests/fail/stacked_borrows/box_noalias_violation.stderr b/tests/fail/stacked_borrows/box_noalias_violation.stderr index 3c84cbcfd5182..139fcd0ca4583 100644 --- a/tests/fail/stacked_borrows/box_noalias_violation.stderr +++ b/tests/fail/stacked_borrows/box_noalias_violation.stderr @@ -18,7 +18,7 @@ LL | unsafe fn test(mut x: Box, y: *const i32) -> i32 { | ^^^^^ = note: BACKTRACE: = note: inside `test` at $DIR/box_noalias_violation.rs:LL:CC -note: inside `main` at $DIR/box_noalias_violation.rs:LL:CC +note: inside `main` --> $DIR/box_noalias_violation.rs:LL:CC | LL | test(Box::from_raw(ptr), ptr); diff --git a/tests/fail/stacked_borrows/deallocate_against_protector1.stderr b/tests/fail/stacked_borrows/deallocate_against_protector1.stderr index bb3eaec1e85c0..516964b9a4e6f 100644 --- a/tests/fail/stacked_borrows/deallocate_against_protector1.stderr +++ b/tests/fail/stacked_borrows/deallocate_against_protector1.stderr @@ -12,18 +12,18 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } = note: inside `alloc::alloc::box_free::` at RUSTLIB/alloc/src/alloc.rs:LL:CC = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside closure at $DIR/deallocate_against_protector1.rs:LL:CC +note: inside closure --> $DIR/deallocate_against_protector1.rs:LL:CC | LL | drop(unsafe { Box::from_raw(raw) }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: inside `<[closure@$DIR/deallocate_against_protector1.rs:LL:CC] as std::ops::FnOnce<(&mut i32,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC -note: inside `inner` at $DIR/deallocate_against_protector1.rs:LL:CC +note: inside `inner` --> $DIR/deallocate_against_protector1.rs:LL:CC | LL | f(x) | ^^^^ -note: inside `main` at $DIR/deallocate_against_protector1.rs:LL:CC +note: inside `main` --> $DIR/deallocate_against_protector1.rs:LL:CC | LL | / inner(Box::leak(Box::new(0)), |x| { diff --git a/tests/fail/stacked_borrows/deallocate_against_protector2.stderr b/tests/fail/stacked_borrows/deallocate_against_protector2.stderr index 25bab1aa564a6..47cfa0de7258c 100644 --- a/tests/fail/stacked_borrows/deallocate_against_protector2.stderr +++ b/tests/fail/stacked_borrows/deallocate_against_protector2.stderr @@ -12,18 +12,18 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } = note: inside `alloc::alloc::box_free::` at RUSTLIB/alloc/src/alloc.rs:LL:CC = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside closure at $DIR/deallocate_against_protector2.rs:LL:CC +note: inside closure --> $DIR/deallocate_against_protector2.rs:LL:CC | LL | drop(unsafe { Box::from_raw(raw) }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: inside `<[closure@$DIR/deallocate_against_protector2.rs:LL:CC] as std::ops::FnOnce<(&mut NotUnpin,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC -note: inside `inner` at $DIR/deallocate_against_protector2.rs:LL:CC +note: inside `inner` --> $DIR/deallocate_against_protector2.rs:LL:CC | LL | f(x) | ^^^^ -note: inside `main` at $DIR/deallocate_against_protector2.rs:LL:CC +note: inside `main` --> $DIR/deallocate_against_protector2.rs:LL:CC | LL | / inner(Box::leak(Box::new(NotUnpin(0, PhantomPinned))), |x| { diff --git a/tests/fail/stacked_borrows/illegal_dealloc1.stderr b/tests/fail/stacked_borrows/illegal_dealloc1.stderr index 3b7802901a54e..f2f13d0d5594e 100644 --- a/tests/fail/stacked_borrows/illegal_dealloc1.stderr +++ b/tests/fail/stacked_borrows/illegal_dealloc1.stderr @@ -18,7 +18,7 @@ LL | ptr1.write(0); | ^^^^^^^^^^^^^ = note: BACKTRACE: = note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC -note: inside `main` at $DIR/illegal_deALLOC.rs:LL:CC +note: inside `main` --> $DIR/illegal_deALLOC.rs:LL:CC | LL | dealloc(ptr2, Layout::from_size_align_unchecked(1, 1)); diff --git a/tests/fail/stacked_borrows/illegal_write6.stderr b/tests/fail/stacked_borrows/illegal_write6.stderr index 1a627b8a88300..49d9050f30947 100644 --- a/tests/fail/stacked_borrows/illegal_write6.stderr +++ b/tests/fail/stacked_borrows/illegal_write6.stderr @@ -18,7 +18,7 @@ LL | fn foo(a: &mut u32, y: *mut u32) -> u32 { | ^ = note: BACKTRACE: = note: inside `foo` at $DIR/illegal_write6.rs:LL:CC -note: inside `main` at $DIR/illegal_write6.rs:LL:CC +note: inside `main` --> $DIR/illegal_write6.rs:LL:CC | LL | foo(x, p); diff --git a/tests/fail/stacked_borrows/invalidate_against_protector1.stderr b/tests/fail/stacked_borrows/invalidate_against_protector1.stderr index 1ef36b7ac10fc..a53c633c38130 100644 --- a/tests/fail/stacked_borrows/invalidate_against_protector1.stderr +++ b/tests/fail/stacked_borrows/invalidate_against_protector1.stderr @@ -18,7 +18,7 @@ LL | fn inner(x: *mut i32, _y: &mut i32) { | ^^ = note: BACKTRACE: = note: inside `inner` at $DIR/invalidate_against_protector1.rs:LL:CC -note: inside `main` at $DIR/invalidate_against_protector1.rs:LL:CC +note: inside `main` --> $DIR/invalidate_against_protector1.rs:LL:CC | LL | inner(xraw, xref); diff --git a/tests/fail/stacked_borrows/invalidate_against_protector2.stderr b/tests/fail/stacked_borrows/invalidate_against_protector2.stderr index 941b936e5d724..6ee78d1aac682 100644 --- a/tests/fail/stacked_borrows/invalidate_against_protector2.stderr +++ b/tests/fail/stacked_borrows/invalidate_against_protector2.stderr @@ -18,7 +18,7 @@ LL | fn inner(x: *mut i32, _y: &i32) { | ^^ = note: BACKTRACE: = note: inside `inner` at $DIR/invalidate_against_protector2.rs:LL:CC -note: inside `main` at $DIR/invalidate_against_protector2.rs:LL:CC +note: inside `main` --> $DIR/invalidate_against_protector2.rs:LL:CC | LL | inner(xraw, xref); diff --git a/tests/fail/stacked_borrows/invalidate_against_protector3.stderr b/tests/fail/stacked_borrows/invalidate_against_protector3.stderr index 176a859ee8af7..2b38dea9dbb71 100644 --- a/tests/fail/stacked_borrows/invalidate_against_protector3.stderr +++ b/tests/fail/stacked_borrows/invalidate_against_protector3.stderr @@ -18,7 +18,7 @@ LL | fn inner(x: *mut i32, _y: &i32) { | ^^ = note: BACKTRACE: = note: inside `inner` at $DIR/invalidate_against_protector3.rs:LL:CC -note: inside `main` at $DIR/invalidate_against_protector3.rs:LL:CC +note: inside `main` --> $DIR/invalidate_against_protector3.rs:LL:CC | LL | inner(ptr, &*ptr); diff --git a/tests/fail/stacked_borrows/issue-miri-1050-1.stderr b/tests/fail/stacked_borrows/issue-miri-1050-1.stderr index 16c8810a8e6d9..c69a3af293c13 100644 --- a/tests/fail/stacked_borrows/issue-miri-1050-1.stderr +++ b/tests/fail/stacked_borrows/issue-miri-1050-1.stderr @@ -9,7 +9,7 @@ LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc) = note: BACKTRACE: = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `main` at $DIR/issue-miri-1050-1.rs:LL:CC +note: inside `main` --> $DIR/issue-miri-1050-1.rs:LL:CC | LL | drop(Box::from_raw(ptr as *mut u32)); diff --git a/tests/fail/stacked_borrows/issue-miri-1050-2.stderr b/tests/fail/stacked_borrows/issue-miri-1050-2.stderr index d57e7662e504a..23d7fdcd03bc5 100644 --- a/tests/fail/stacked_borrows/issue-miri-1050-2.stderr +++ b/tests/fail/stacked_borrows/issue-miri-1050-2.stderr @@ -9,7 +9,7 @@ LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc) = note: BACKTRACE: = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `main` at $DIR/issue-miri-1050-2.rs:LL:CC +note: inside `main` --> $DIR/issue-miri-1050-2.rs:LL:CC | LL | drop(Box::from_raw(ptr.as_ptr())); diff --git a/tests/fail/stacked_borrows/mut_exclusive_violation1.stderr b/tests/fail/stacked_borrows/mut_exclusive_violation1.stderr index 1c7f8e12d3d78..2f3900c40d726 100644 --- a/tests/fail/stacked_borrows/mut_exclusive_violation1.stderr +++ b/tests/fail/stacked_borrows/mut_exclusive_violation1.stderr @@ -21,12 +21,12 @@ LL | *our = 5; | ^^^^^^^^ = note: BACKTRACE: = note: inside `unknown_code_2` at $DIR/mut_exclusive_violation1.rs:LL:CC -note: inside `demo_mut_advanced_unique` at $DIR/mut_exclusive_violation1.rs:LL:CC +note: inside `demo_mut_advanced_unique` --> $DIR/mut_exclusive_violation1.rs:LL:CC | LL | unknown_code_2(); | ^^^^^^^^^^^^^^^^ -note: inside `main` at $DIR/mut_exclusive_violation1.rs:LL:CC +note: inside `main` --> $DIR/mut_exclusive_violation1.rs:LL:CC | LL | demo_mut_advanced_unique(&mut 0); diff --git a/tests/fail/stacked_borrows/newtype_pair_retagging.stderr b/tests/fail/stacked_borrows/newtype_pair_retagging.stderr index 70186dd3a53f3..90677dfaf555e 100644 --- a/tests/fail/stacked_borrows/newtype_pair_retagging.stderr +++ b/tests/fail/stacked_borrows/newtype_pair_retagging.stderr @@ -19,17 +19,17 @@ LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) { = note: BACKTRACE: = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside closure at $DIR/newtype_pair_retagging.rs:LL:CC +note: inside closure --> $DIR/newtype_pair_retagging.rs:LL:CC | LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^ -note: inside `dealloc_while_running::<[closure@$DIR/newtype_pair_retagging.rs:LL:CC]>` at $DIR/newtype_pair_retagging.rs:LL:CC +note: inside `dealloc_while_running::<[closure@$DIR/newtype_pair_retagging.rs:LL:CC]>` --> $DIR/newtype_pair_retagging.rs:LL:CC | LL | dealloc(); | ^^^^^^^^^ -note: inside `main` at $DIR/newtype_pair_retagging.rs:LL:CC +note: inside `main` --> $DIR/newtype_pair_retagging.rs:LL:CC | LL | / dealloc_while_running( diff --git a/tests/fail/stacked_borrows/newtype_retagging.stderr b/tests/fail/stacked_borrows/newtype_retagging.stderr index 69fa27c9c096f..f189d0483d12d 100644 --- a/tests/fail/stacked_borrows/newtype_retagging.stderr +++ b/tests/fail/stacked_borrows/newtype_retagging.stderr @@ -19,17 +19,17 @@ LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) { = note: BACKTRACE: = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside closure at $DIR/newtype_retagging.rs:LL:CC +note: inside closure --> $DIR/newtype_retagging.rs:LL:CC | LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^ -note: inside `dealloc_while_running::<[closure@$DIR/newtype_retagging.rs:LL:CC]>` at $DIR/newtype_retagging.rs:LL:CC +note: inside `dealloc_while_running::<[closure@$DIR/newtype_retagging.rs:LL:CC]>` --> $DIR/newtype_retagging.rs:LL:CC | LL | dealloc(); | ^^^^^^^^^ -note: inside `main` at $DIR/newtype_retagging.rs:LL:CC +note: inside `main` --> $DIR/newtype_retagging.rs:LL:CC | LL | / dealloc_while_running( diff --git a/tests/fail/stacked_borrows/pointer_smuggling.stderr b/tests/fail/stacked_borrows/pointer_smuggling.stderr index 6415af1e18bbf..7d58d1aebbecd 100644 --- a/tests/fail/stacked_borrows/pointer_smuggling.stderr +++ b/tests/fail/stacked_borrows/pointer_smuggling.stderr @@ -21,7 +21,7 @@ LL | *val = 2; // this invalidates any raw ptrs `fun1` might have created. | ^^^^^^^^ = note: BACKTRACE: = note: inside `fun2` at $DIR/pointer_smuggling.rs:LL:CC -note: inside `main` at $DIR/pointer_smuggling.rs:LL:CC +note: inside `main` --> $DIR/pointer_smuggling.rs:LL:CC | LL | fun2(); // if they now use a raw ptr they break our reference diff --git a/tests/fail/stacked_borrows/retag_data_race_read.stderr b/tests/fail/stacked_borrows/retag_data_race_read.stderr index f25d689524d1b..5dc936f070744 100644 --- a/tests/fail/stacked_borrows/retag_data_race_read.stderr +++ b/tests/fail/stacked_borrows/retag_data_race_read.stderr @@ -8,7 +8,7 @@ LL | *p = 5; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside `thread_2` at $DIR/retag_data_race_read.rs:LL:CC -note: inside closure at $DIR/retag_data_race_read.rs:LL:CC +note: inside closure --> $DIR/retag_data_race_read.rs:LL:CC | LL | let t2 = std::thread::spawn(move || thread_2(p)); diff --git a/tests/fail/stacked_borrows/retag_data_race_write.stderr b/tests/fail/stacked_borrows/retag_data_race_write.stderr index f97e6bb11e9d6..03c2450356416 100644 --- a/tests/fail/stacked_borrows/retag_data_race_write.stderr +++ b/tests/fail/stacked_borrows/retag_data_race_write.stderr @@ -8,7 +8,7 @@ LL | *p = 5; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: = note: inside `thread_2` at $DIR/retag_data_race_write.rs:LL:CC -note: inside closure at $DIR/retag_data_race_write.rs:LL:CC +note: inside closure --> $DIR/retag_data_race_write.rs:LL:CC | LL | let t2 = std::thread::spawn(move || thread_2(p)); diff --git a/tests/fail/stacked_borrows/return_invalid_mut.stderr b/tests/fail/stacked_borrows/return_invalid_mut.stderr index 9deb0c41742f3..1b28f780c1c54 100644 --- a/tests/fail/stacked_borrows/return_invalid_mut.stderr +++ b/tests/fail/stacked_borrows/return_invalid_mut.stderr @@ -21,7 +21,7 @@ LL | let _val = unsafe { *xraw }; // invalidate xref | ^^^^^ = note: BACKTRACE: = note: inside `foo` at $DIR/return_invalid_mut.rs:LL:CC -note: inside `main` at $DIR/return_invalid_mut.rs:LL:CC +note: inside `main` --> $DIR/return_invalid_mut.rs:LL:CC | LL | foo(&mut (1, 2)); diff --git a/tests/fail/stacked_borrows/return_invalid_mut_option.stderr b/tests/fail/stacked_borrows/return_invalid_mut_option.stderr index c0ff35ebcde30..db14dcafa0084 100644 --- a/tests/fail/stacked_borrows/return_invalid_mut_option.stderr +++ b/tests/fail/stacked_borrows/return_invalid_mut_option.stderr @@ -21,7 +21,7 @@ LL | let _val = unsafe { *xraw }; // invalidate xref | ^^^^^ = note: BACKTRACE: = note: inside `foo` at $DIR/return_invalid_mut_option.rs:LL:CC -note: inside `main` at $DIR/return_invalid_mut_option.rs:LL:CC +note: inside `main` --> $DIR/return_invalid_mut_option.rs:LL:CC | LL | match foo(&mut (1, 2)) { diff --git a/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr b/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr index 9abf43c29f08f..81ed4218aade7 100644 --- a/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr +++ b/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr @@ -21,7 +21,7 @@ LL | let _val = unsafe { *xraw }; // invalidate xref | ^^^^^ = note: BACKTRACE: = note: inside `foo` at $DIR/return_invalid_mut_tuple.rs:LL:CC -note: inside `main` at $DIR/return_invalid_mut_tuple.rs:LL:CC +note: inside `main` --> $DIR/return_invalid_mut_tuple.rs:LL:CC | LL | foo(&mut (1, 2)).0; diff --git a/tests/fail/stacked_borrows/return_invalid_shr.stderr b/tests/fail/stacked_borrows/return_invalid_shr.stderr index dd651517c2fb0..9c8cc50b2d7ac 100644 --- a/tests/fail/stacked_borrows/return_invalid_shr.stderr +++ b/tests/fail/stacked_borrows/return_invalid_shr.stderr @@ -21,7 +21,7 @@ LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ = note: BACKTRACE: = note: inside `foo` at $DIR/return_invalid_shr.rs:LL:CC -note: inside `main` at $DIR/return_invalid_shr.rs:LL:CC +note: inside `main` --> $DIR/return_invalid_shr.rs:LL:CC | LL | foo(&mut (1, 2)); diff --git a/tests/fail/stacked_borrows/return_invalid_shr_option.stderr b/tests/fail/stacked_borrows/return_invalid_shr_option.stderr index 6066bf89f5d09..00ce6f6cd5fe1 100644 --- a/tests/fail/stacked_borrows/return_invalid_shr_option.stderr +++ b/tests/fail/stacked_borrows/return_invalid_shr_option.stderr @@ -21,7 +21,7 @@ LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ = note: BACKTRACE: = note: inside `foo` at $DIR/return_invalid_shr_option.rs:LL:CC -note: inside `main` at $DIR/return_invalid_shr_option.rs:LL:CC +note: inside `main` --> $DIR/return_invalid_shr_option.rs:LL:CC | LL | match foo(&mut (1, 2)) { diff --git a/tests/fail/stacked_borrows/return_invalid_shr_tuple.stderr b/tests/fail/stacked_borrows/return_invalid_shr_tuple.stderr index 52d365246a744..bbd17b1284c5e 100644 --- a/tests/fail/stacked_borrows/return_invalid_shr_tuple.stderr +++ b/tests/fail/stacked_borrows/return_invalid_shr_tuple.stderr @@ -21,7 +21,7 @@ LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ = note: BACKTRACE: = note: inside `foo` at $DIR/return_invalid_shr_tuple.rs:LL:CC -note: inside `main` at $DIR/return_invalid_shr_tuple.rs:LL:CC +note: inside `main` --> $DIR/return_invalid_shr_tuple.rs:LL:CC | LL | foo(&mut (1, 2)).0; diff --git a/tests/fail/stacked_borrows/shr_frozen_violation1.stderr b/tests/fail/stacked_borrows/shr_frozen_violation1.stderr index 0818d07da48e5..fe0ac211318aa 100644 --- a/tests/fail/stacked_borrows/shr_frozen_violation1.stderr +++ b/tests/fail/stacked_borrows/shr_frozen_violation1.stderr @@ -16,12 +16,12 @@ LL | *(x as *const i32 as *mut i32) = 7; | ^ = note: BACKTRACE: = note: inside `unknown_code` at $DIR/shr_frozen_violation1.rs:LL:CC -note: inside `foo` at $DIR/shr_frozen_violation1.rs:LL:CC +note: inside `foo` --> $DIR/shr_frozen_violation1.rs:LL:CC | LL | unknown_code(&*x); | ^^^^^^^^^^^^^^^^^ -note: inside `main` at $DIR/shr_frozen_violation1.rs:LL:CC +note: inside `main` --> $DIR/shr_frozen_violation1.rs:LL:CC | LL | println!("{}", foo(&mut 0)); diff --git a/tests/fail/stacked_borrows/zst_slice.stderr b/tests/fail/stacked_borrows/zst_slice.stderr index 86f1da1f70a33..e134ee2845d05 100644 --- a/tests/fail/stacked_borrows/zst_slice.stderr +++ b/tests/fail/stacked_borrows/zst_slice.stderr @@ -16,7 +16,7 @@ LL | assert_eq!(*s.get_unchecked(1), 2); | ^^^^^^^^^^^^^^^^^^ = note: BACKTRACE: = note: inside `core::slice::::get_unchecked::` at RUSTLIB/core/src/slice/mod.rs:LL:CC -note: inside `main` at $DIR/zst_slice.rs:LL:CC +note: inside `main` --> $DIR/zst_slice.rs:LL:CC | LL | assert_eq!(*s.get_unchecked(1), 2); diff --git a/tests/fail/uninit_buffer.stderr b/tests/fail/uninit_buffer.stderr index a543d59addb14..8da532cfff05b 100644 --- a/tests/fail/uninit_buffer.stderr +++ b/tests/fail/uninit_buffer.stderr @@ -9,7 +9,7 @@ LL | let mut order = unsafe { memcmp(left.as_ptr(), right.as_ptr(), len) = note: BACKTRACE: = note: inside `::compare` at RUSTLIB/core/src/slice/cmp.rs:LL:CC = note: inside `core::slice::cmp::::cmp` at RUSTLIB/core/src/slice/cmp.rs:LL:CC -note: inside `main` at $DIR/uninit_buffer.rs:LL:CC +note: inside `main` --> $DIR/uninit_buffer.rs:LL:CC | LL | drop(slice1.cmp(slice2)); diff --git a/tests/fail/uninit_buffer_with_provenance.stderr b/tests/fail/uninit_buffer_with_provenance.stderr index 715d76aa1c2e7..210fc8e109aa4 100644 --- a/tests/fail/uninit_buffer_with_provenance.stderr +++ b/tests/fail/uninit_buffer_with_provenance.stderr @@ -9,7 +9,7 @@ LL | let mut order = unsafe { memcmp(left.as_ptr(), right.as_ptr(), len) = note: BACKTRACE: = note: inside `::compare` at RUSTLIB/core/src/slice/cmp.rs:LL:CC = note: inside `core::slice::cmp::::cmp` at RUSTLIB/core/src/slice/cmp.rs:LL:CC -note: inside `main` at $DIR/uninit_buffer_with_provenance.rs:LL:CC +note: inside `main` --> $DIR/uninit_buffer_with_provenance.rs:LL:CC | LL | drop(slice1.cmp(slice2)); diff --git a/tests/pass/box.stderr b/tests/pass/box.stderr index 0001a8dd6eb33..4c2fb40e11021 100644 --- a/tests/pass/box.stderr +++ b/tests/pass/box.stderr @@ -12,7 +12,7 @@ LL | let r2 = ((r as usize) + 0) as *mut i32; = help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning. = note: BACKTRACE: = note: inside `into_raw` at $DIR/box.rs:LL:CC -note: inside `main` at $DIR/box.rs:LL:CC +note: inside `main` --> $DIR/box.rs:LL:CC | LL | into_raw(); @@ -25,7 +25,7 @@ LL | let r = ((u.as_ptr() as usize) + 0) as *mut i32; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ integer-to-pointer cast | = note: inside `into_unique` at $DIR/box.rs:LL:CC -note: inside `main` at $DIR/box.rs:LL:CC +note: inside `main` --> $DIR/box.rs:LL:CC | LL | into_unique();