Skip to content

Commit e162eeb

Browse files
committed
Use local and remapped paths where appropriate
1 parent 5de83e7 commit e162eeb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/common.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,9 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
334334
let topmost = span.ctxt().outer_expn().expansion_cause().unwrap_or(span);
335335
let caller = self.tcx.sess.source_map().lookup_char_pos(topmost.lo());
336336
let const_loc = self.tcx.const_caller_location((
337-
rustc_span::symbol::Symbol::intern(&caller.file.name.to_string()),
337+
rustc_span::symbol::Symbol::intern(
338+
&caller.file.name.prefer_remapped().to_string_lossy(),
339+
),
338340
caller.line as u32,
339341
caller.col_display as u32 + 1,
340342
));

src/debuginfo/line_info.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ fn line_program_add_file(
8787
filename => {
8888
let dir_id = line_program.default_directory();
8989
let dummy_file_name = LineString::new(
90-
filename.to_string().into_bytes(),
90+
filename.prefer_remapped().to_string().into_bytes(),
9191
line_program.encoding(),
9292
line_strings,
9393
);

0 commit comments

Comments
 (0)