@@ -2,7 +2,7 @@ use crate::*;
22use rustc_ast:: ast:: Mutability ;
33use rustc_middle:: ty:: layout:: LayoutOf as _;
44use rustc_middle:: ty:: { self , Instance , Ty } ;
5- use rustc_span:: { BytePos , Loc , Symbol } ;
5+ use rustc_span:: { hygiene , BytePos , Loc , Symbol } ;
66use rustc_target:: { abi:: Size , spec:: abi:: Abi } ;
77
88impl < ' 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
0 commit comments