From 0d2278c6c6c215f0268c15946cb89a3fe9284fd3 Mon Sep 17 00:00:00 2001 From: Andy Wang Date: Wed, 12 May 2021 14:38:50 +0100 Subject: [PATCH] Prefer remapped filename in backtrace to match rustc behaviour --- src/shims/backtrace.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shims/backtrace.rs b/src/shims/backtrace.rs index 159a0bc1f8c..224d8182b15 100644 --- a/src/shims/backtrace.rs +++ b/src/shims/backtrace.rs @@ -108,7 +108,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx let lo = tcx.sess.source_map().lookup_char_pos(pos); - let filename = lo.file.name.to_string(); + let filename = lo.file.name.prefer_remapped().to_string(); let lineno: u32 = lo.line as u32; // `lo.col` is 0-based - add 1 to make it 1-based for the caller. let colno: u32 = lo.col.0 as u32 + 1;