File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
compiler/rustc_builtin_macros/src Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -711,7 +711,6 @@ fn report_redundant_format_arguments(
711711 let mut fmt_arg_indices = vec ! [ ] ;
712712 let mut args_spans = vec ! [ ] ;
713713 let mut fmt_spans = vec ! [ ] ;
714- let mut bindings = vec ! [ ] ;
715714
716715 for ( i, unnamed_arg) in args. unnamed_args ( ) . iter ( ) . enumerate ( ) . rev ( ) {
717716 let Some ( ty) = unnamed_arg. expr . to_ty ( ) else { continue } ;
@@ -725,17 +724,17 @@ fn report_redundant_format_arguments(
725724 let matching_placeholders = placeholders
726725 . iter ( )
727726 . filter ( |( _, inline_binding) | argument_binding == * inline_binding)
727+ . map ( |( span, _) | span)
728728 . collect :: < Vec < _ > > ( ) ;
729729
730730 if !matching_placeholders. is_empty ( ) {
731731 fmt_arg_indices. push ( i) ;
732732 args_spans. push ( unnamed_arg. expr . span ) ;
733- for ( span, binding ) in & matching_placeholders {
734- if fmt_spans. contains ( span) {
733+ for span in & matching_placeholders {
734+ if fmt_spans. contains ( * span) {
735735 continue ;
736736 }
737- fmt_spans. push ( * span) ;
738- bindings. push ( binding) ;
737+ fmt_spans. push ( * * span) ;
739738 }
740739 }
741740 }
You can’t perform that action at this time.
0 commit comments