@@ -88,10 +88,7 @@ const HELP_FIELD_REFERENCE: &str = "the field referenced by this binding is unus
88
88
const HELP_INCLUDE_ALL_FIELDS : & str = "consider including all fields in this `Debug` impl" ;
89
89
const HELP_FINISH_NON_EXHAUSTIVE : & str = "consider calling `.finish_non_exhaustive()` if you intend to ignore fields" ;
90
90
91
- fn report_lints < I > ( cx : & LateContext < ' _ > , span : Span , span_notes : I )
92
- where
93
- I : Iterator < Item = ( Span , & ' static str ) > ,
94
- {
91
+ fn report_lints ( cx : & LateContext < ' _ > , span : Span , span_notes : Vec < ( Span , & ' static str ) > ) {
95
92
span_lint_and_then ( cx, MISSING_FIELDS_IN_DEBUG , span, WARN , |diag| {
96
93
for ( span, note) in span_notes {
97
94
diag. span_note ( span, note) ;
@@ -177,7 +174,7 @@ fn check_struct<'tcx>(
177
174
. collect :: < Vec < _ > > ( ) ;
178
175
179
176
if !span_notes. is_empty ( ) {
180
- report_lints ( cx, item. span , span_notes. into_iter ( ) ) ;
177
+ report_lints ( cx, item. span , span_notes) ;
181
178
}
182
179
}
183
180
@@ -250,7 +247,7 @@ fn check_enum<'tcx>(
250
247
}
251
248
252
249
if !span_notes. is_empty ( ) {
253
- report_lints ( cx, item. span , span_notes. into_iter ( ) ) ;
250
+ report_lints ( cx, item. span , span_notes) ;
254
251
}
255
252
}
256
253
0 commit comments