Print dummy spans as no-location
This commit is contained in:
parent
ed597e7e19
commit
fab319be73
5 changed files with 9 additions and 9 deletions
|
@ -407,7 +407,7 @@ impl SourceMap {
|
|||
}
|
||||
|
||||
fn span_to_string(&self, sp: Span, prefer_local: bool) -> String {
|
||||
if self.files.borrow().source_files.is_empty() && sp.is_dummy() {
|
||||
if self.files.borrow().source_files.is_empty() || sp.is_dummy() {
|
||||
return "no-location".to_string();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue