Use local and remapped paths where appropriate

This commit is contained in:
Andy Wang
2021-04-19 23:27:02 +01:00
parent fb4f6439f6
commit 5417b45c26
28 changed files with 85 additions and 74 deletions

View File

@@ -80,7 +80,7 @@ impl<'tcx> SaveContext<'tcx> {
let end = sm.lookup_char_pos(span.hi());
SpanData {
file_name: start.file.name.to_string().into(),
file_name: start.file.name.prefer_remapped().to_string().into(),
byte_start: span.lo().0,
byte_end: span.hi().0,
line_start: Row::new_one_indexed(start.line as u32),
@@ -290,7 +290,7 @@ impl<'tcx> SaveContext<'tcx> {
name: item.ident.to_string(),
qualname,
span: self.span_from_span(item.ident.span),
value: filename.to_string(),
value: filename.prefer_remapped().to_string(),
parent: None,
children: m
.item_ids