1
Fork 0

Rollup merge of #86153 - tmiasko:dummy-span, r=estebank

Print dummy spans as `no-location`

Fixes #58808.
This commit is contained in:
Yuki Okushi 2021-06-12 01:15:59 +09:00 committed by GitHub
commit 79c0559ce1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 9 deletions

View file

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