Use local and remapped paths where appropriate
This commit is contained in:
parent
fb4f6439f6
commit
5417b45c26
28 changed files with 85 additions and 74 deletions
|
@ -369,11 +369,6 @@ impl SourceMap {
|
|||
source_file
|
||||
}
|
||||
|
||||
pub fn mk_substr_filename(&self, sp: Span) -> String {
|
||||
let pos = self.lookup_char_pos(sp.lo());
|
||||
format!("<{}:{}:{}>", pos.file.name, pos.line, pos.col.to_usize() + 1)
|
||||
}
|
||||
|
||||
// If there is a doctest offset, applies it to the line.
|
||||
pub fn doctest_offset_line(&self, file: &FileName, orig: usize) -> usize {
|
||||
match file {
|
||||
|
@ -420,7 +415,7 @@ impl SourceMap {
|
|||
let hi = self.lookup_char_pos(sp.hi());
|
||||
format!(
|
||||
"{}:{}:{}: {}:{}",
|
||||
lo.file.name,
|
||||
lo.file.name.prefer_remapped(),
|
||||
lo.line,
|
||||
lo.col.to_usize() + 1,
|
||||
hi.line,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue