File tree 1 file changed +4
-5
lines changed
compiler/rustc_builtin_macros/src
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(
711
711
let mut fmt_arg_indices = vec ! [ ] ;
712
712
let mut args_spans = vec ! [ ] ;
713
713
let mut fmt_spans = vec ! [ ] ;
714
- let mut bindings = vec ! [ ] ;
715
714
716
715
for ( i, unnamed_arg) in args. unnamed_args ( ) . iter ( ) . enumerate ( ) . rev ( ) {
717
716
let Some ( ty) = unnamed_arg. expr . to_ty ( ) else { continue } ;
@@ -725,17 +724,17 @@ fn report_redundant_format_arguments(
725
724
let matching_placeholders = placeholders
726
725
. iter ( )
727
726
. filter ( |( _, inline_binding) | argument_binding == * inline_binding)
727
+ . map ( |( span, _) | span)
728
728
. collect :: < Vec < _ > > ( ) ;
729
729
730
730
if !matching_placeholders. is_empty ( ) {
731
731
fmt_arg_indices. push ( i) ;
732
732
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) {
735
735
continue ;
736
736
}
737
- fmt_spans. push ( * span) ;
738
- bindings. push ( binding) ;
737
+ fmt_spans. push ( * * span) ;
739
738
}
740
739
}
741
740
}
You can’t perform that action at this time.
0 commit comments