Skip to content

Commit 0d2278c

Browse files
committed
Prefer remapped filename in backtrace to match rustc behaviour
1 parent 7af7e9e commit 0d2278c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shims/backtrace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
108108

109109
let lo = tcx.sess.source_map().lookup_char_pos(pos);
110110

111-
let filename = lo.file.name.to_string();
111+
let filename = lo.file.name.prefer_remapped().to_string();
112112
let lineno: u32 = lo.line as u32;
113113
// `lo.col` is 0-based - add 1 to make it 1-based for the caller.
114114
let colno: u32 = lo.col.0 as u32 + 1;

0 commit comments

Comments
 (0)