File tree 1 file changed +2
-8
lines changed
compiler/rustc_error_messages/src
1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -320,18 +320,12 @@ impl MultiSpan {
320
320
321
321
/// Returns `true` if any of the primary spans are displayable.
322
322
pub fn has_primary_spans ( & self ) -> bool {
323
- self . primary_spans . iter ( ) . any ( |sp| ! sp. is_dummy ( ) )
323
+ ! self . primary_spans . iter ( ) . all ( |sp| sp. is_dummy ( ) )
324
324
}
325
325
326
326
/// Returns `true` if this contains only a dummy primary span with any hygienic context.
327
327
pub fn is_dummy ( & self ) -> bool {
328
- let mut is_dummy = true ;
329
- for span in & self . primary_spans {
330
- if !span. is_dummy ( ) {
331
- is_dummy = false ;
332
- }
333
- }
334
- is_dummy
328
+ self . primary_spans . iter ( ) . all ( |sp| sp. is_dummy ( ) )
335
329
}
336
330
337
331
/// Replaces all occurrences of one Span with another. Used to move `Span`s in areas that don't
You can’t perform that action at this time.
0 commit comments