Skip to content

Commit 09a5b7c

Browse files
committed
Auto merge of #3515 - rust-lang:rustup-2024-04-26, r=oli-obk
Automatic Rustup
2 parents 2b676f2 + 0671d42 commit 09a5b7c

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cb3752d20e0f5d24348062211102a08d46fbecff
1+
6acb9e75ebc936df737381a9d0b7a7bccd6f0b2f

src/shims/backtrace.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::*;
22
use rustc_ast::ast::Mutability;
33
use rustc_middle::ty::layout::LayoutOf as _;
44
use rustc_middle::ty::{self, Instance, Ty};
5-
use rustc_span::{BytePos, Loc, Symbol};
5+
use rustc_span::{hygiene, BytePos, Loc, Symbol};
66
use rustc_target::{abi::Size, spec::abi::Abi};
77

88
impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for crate::MiriInterpCx<'mir, 'tcx> {}
@@ -45,12 +45,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
4545

4646
let mut data = Vec::new();
4747
for frame in this.active_thread_stack().iter().rev() {
48-
let mut span = frame.current_span();
49-
// Match the behavior of runtime backtrace spans
50-
// by using a non-macro span in our backtrace. See `FunctionCx::debug_loc`.
51-
if span.from_expansion() && !tcx.sess.opts.unstable_opts.debug_macros {
52-
span = rustc_span::hygiene::walk_chain(span, frame.body.span.ctxt())
53-
}
48+
// Match behavior of debuginfo (`FunctionCx::adjusted_span_and_dbg_scope`).
49+
let span = hygiene::walk_chain_collapsed(frame.current_span(), frame.body.span);
5450
data.push((frame.instance, span.lo()));
5551
}
5652

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
$DIR/backtrace-api-v0.rs:24:14 (func_d)
2-
$DIR/backtrace-api-v0.rs:20:5 (func_c)
2+
$DIR/backtrace-api-v0.rs:14:9 (func_c)
33
$DIR/backtrace-api-v0.rs:9:5 (func_b::<u8>)
44
$DIR/backtrace-api-v0.rs:5:5 (func_a)
55
$DIR/backtrace-api-v0.rs:29:18 (main)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
$DIR/backtrace-api-v1.rs:27:9 (func_d)
2-
$DIR/backtrace-api-v1.rs:20:5 (func_c)
2+
$DIR/backtrace-api-v1.rs:14:9 (func_c)
33
$DIR/backtrace-api-v1.rs:9:5 (func_b::<u8>)
44
$DIR/backtrace-api-v1.rs:5:5 (func_a)
55
$DIR/backtrace-api-v1.rs:34:18 (main)

0 commit comments

Comments
 (0)