We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c4b8df5 commit 8f4da0eCopy full SHA for 8f4da0e
src/libsyntax_pos/lib.rs
@@ -670,7 +670,7 @@ impl MultiSpan {
670
671
/// Returns wether any of the primary spans is displayable.
672
pub fn has_primary_spans(&self) -> bool {
673
- self.primary_spans.iter().any(|sp| *sp != DUMMY_SP)
+ self.primary_spans.iter().any(|sp| !sp.is_dummy())
674
}
675
676
/// Returns `true` if this contains only a dummy primary span with any hygienic context.
@@ -734,7 +734,7 @@ impl MultiSpan {
734
735
/// Returns wether any of the span labels is displayable.
736
pub fn has_span_labels(&self) -> bool {
737
- self.span_labels.iter().any(|(sp, _)| *sp != DUMMY_SP)
+ self.span_labels.iter().any(|(sp, _)| !sp.is_dummy())
738
739
740
0 commit comments