Fortify dummy span checking

This commit is contained in:
Vadim Petrochenkov 2018-06-25 01:00:21 +03:00
parent 297109ea32
commit 9f92fce77c
21 changed files with 59 additions and 59 deletions

View file

@ -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();
}