Skip to content

Commit e3e03ee

Browse files
committed
review comment
1 parent a39c469 commit e3e03ee

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

compiler/rustc_errors/src/emitter.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -477,10 +477,9 @@ pub trait Emitter {
477477
let mut span = sp;
478478
while let Some(callsite) = span.parent_callsite() {
479479
span = callsite;
480-
if source_map.is_imported(span) {
481-
continue;
480+
if !source_map.is_imported(span) {
481+
return Some((sp, span));
482482
}
483-
return Some((sp, span));
484483
}
485484
}
486485
None

0 commit comments

Comments
 (0)