@@ -2,7 +2,7 @@ use crate::*;
2
2
use rustc_ast:: ast:: Mutability ;
3
3
use rustc_middle:: ty:: layout:: LayoutOf as _;
4
4
use rustc_middle:: ty:: { self , Instance , Ty } ;
5
- use rustc_span:: { BytePos , Loc , Symbol } ;
5
+ use rustc_span:: { hygiene , BytePos , Loc , Symbol } ;
6
6
use rustc_target:: { abi:: Size , spec:: abi:: Abi } ;
7
7
8
8
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> {
45
45
46
46
let mut data = Vec :: new ( ) ;
47
47
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 ) ;
54
50
data. push ( ( frame. instance , span. lo ( ) ) ) ;
55
51
}
56
52
0 commit comments