Skip to content

Commit 8f4da0e

Browse files
committed
Use is_dummy instead of comparing against DUMMY_SP
1 parent c4b8df5 commit 8f4da0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libsyntax_pos/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ impl MultiSpan {
670670

671671
/// Returns wether any of the primary spans is displayable.
672672
pub fn has_primary_spans(&self) -> bool {
673-
self.primary_spans.iter().any(|sp| *sp != DUMMY_SP)
673+
self.primary_spans.iter().any(|sp| !sp.is_dummy())
674674
}
675675

676676
/// Returns `true` if this contains only a dummy primary span with any hygienic context.
@@ -734,7 +734,7 @@ impl MultiSpan {
734734

735735
/// Returns wether any of the span labels is displayable.
736736
pub fn has_span_labels(&self) -> bool {
737-
self.span_labels.iter().any(|(sp, _)| *sp != DUMMY_SP)
737+
self.span_labels.iter().any(|(sp, _)| !sp.is_dummy())
738738
}
739739
}
740740

0 commit comments

Comments
 (0)