Update compiler/rustc_error_messages/src/lib.rs

Co-authored-by: Janusz Marcinkiewicz <virrages@gmail.com>
This commit is contained in:
Isak Nyberg 2022-04-16 23:52:18 +02:00 committed by GitHub
parent 53b2aca9da
commit 657ae03f60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -320,7 +320,7 @@ impl MultiSpan {
/// Returns `true` if any of the primary spans are displayable.
pub fn has_primary_spans(&self) -> bool {
!self.primary_spans.iter().all(|sp| sp.is_dummy())
!self.is_dummy()
}
/// Returns `true` if this contains only a dummy primary span with any hygienic context.