Fortify dummy span checking
This commit is contained in:
parent
297109ea32
commit
9f92fce77c
21 changed files with 59 additions and 59 deletions
|
@ -443,7 +443,7 @@ impl CodeMap {
|
|||
}
|
||||
|
||||
pub fn span_to_string(&self, sp: Span) -> String {
|
||||
if self.files.borrow().file_maps.is_empty() && sp.source_equal(&DUMMY_SP) {
|
||||
if self.files.borrow().file_maps.is_empty() && sp.is_dummy() {
|
||||
return "no-location".to_string();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue