Path remapping: Make behavior of diagnostics output dependent on presence of --remap-path-prefix.
This commit is contained in:
parent
dfd6306d26
commit
af1b65cb18
13 changed files with 65 additions and 41 deletions
|
@ -272,11 +272,12 @@ impl<'tcx> fmt::Display for FrameInfo<'tcx> {
|
|||
write!(f, "inside `{}`", self.instance)?;
|
||||
}
|
||||
if !self.span.is_dummy() {
|
||||
let lo = tcx.sess.source_map().lookup_char_pos(self.span.lo());
|
||||
let sm = tcx.sess.source_map();
|
||||
let lo = sm.lookup_char_pos(self.span.lo());
|
||||
write!(
|
||||
f,
|
||||
" at {}:{}:{}",
|
||||
lo.file.name.prefer_local(),
|
||||
sm.filename_for_diagnostics(&lo.file.name),
|
||||
lo.line,
|
||||
lo.col.to_usize() + 1
|
||||
)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue