File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
compiler/rustc_errors/src Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -519,16 +519,15 @@ impl Diagnostic {
519519
520520 /// Helper for pushing to `self.suggestions`, if available (not disable).
521521 fn push_suggestion ( & mut self , suggestion : CodeSuggestion ) {
522- let in_derive = suggestion. substitutions . iter ( ) . any ( |subst| {
523- subst. parts . iter ( ) . any ( |part| {
522+ for subst in & suggestion. substitutions {
523+ for part in & subst. parts {
524524 let span = part. span ;
525525 let call_site = span. ctxt ( ) . outer_expn_data ( ) . call_site ;
526- span. in_derive_expansion ( ) && span. overlaps_or_adjacent ( call_site)
527- } )
528- } ) ;
529- if in_derive {
530- // Ignore if spans is from derive macro.
531- return ;
526+ if span. in_derive_expansion ( ) && span. overlaps_or_adjacent ( call_site) {
527+ // Ignore if spans is from derive macro.
528+ return ;
529+ }
530+ }
532531 }
533532
534533 if let Ok ( suggestions) = & mut self . suggestions {
You can’t perform that action at this time.
0 commit comments