File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
compiler/rustc_error_messages/src Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -320,18 +320,12 @@ impl MultiSpan {
320320
321321 /// Returns `true` if any of the primary spans are displayable.
322322 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 ( ) )
324324 }
325325
326326 /// Returns `true` if this contains only a dummy primary span with any hygienic context.
327327 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 ( ) )
335329 }
336330
337331 /// 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