This repository was archived by the owner on May 28, 2025. It is now read-only.
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 @@ -720,7 +720,6 @@ fn report_redundant_format_arguments(
720
720
let mut fmt_arg_indices = vec ! [ ] ;
721
721
let mut args_spans = vec ! [ ] ;
722
722
let mut fmt_spans = vec ! [ ] ;
723
- let mut bindings = vec ! [ ] ;
724
723
725
724
for ( i, unnamed_arg) in args. unnamed_args ( ) . iter ( ) . enumerate ( ) . rev ( ) {
726
725
let Some ( ty) = unnamed_arg. expr . to_ty ( ) else { continue } ;
@@ -734,17 +733,17 @@ fn report_redundant_format_arguments(
734
733
let matching_placeholders = placeholders
735
734
. iter ( )
736
735
. filter ( |( _, inline_binding) | argument_binding == * inline_binding)
736
+ . map ( |( span, _) | span)
737
737
. collect :: < Vec < _ > > ( ) ;
738
738
739
739
if !matching_placeholders. is_empty ( ) {
740
740
fmt_arg_indices. push ( i) ;
741
741
args_spans. push ( unnamed_arg. expr . span ) ;
742
- for ( span, binding ) in & matching_placeholders {
743
- if fmt_spans. contains ( span) {
742
+ for span in & matching_placeholders {
743
+ if fmt_spans. contains ( * span) {
744
744
continue ;
745
745
}
746
- fmt_spans. push ( * span) ;
747
- bindings. push ( binding) ;
746
+ fmt_spans. push ( * * span) ;
748
747
}
749
748
}
750
749
}
You can’t perform that action at this time.
0 commit comments