@@ -224,15 +224,15 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Attributes {
224
224
}
225
225
}
226
226
227
- fn check_item ( & mut self , cx : & LateContext < ' a , ' tcx > , item : & ' tcx Item ) {
227
+ fn check_item ( & mut self , cx : & LateContext < ' a , ' tcx > , item : & ' tcx Item < ' _ > ) {
228
228
if is_relevant_item ( cx, item) {
229
229
check_attrs ( cx, item. span , item. ident . name , & item. attrs )
230
230
}
231
231
match item. kind {
232
232
ItemKind :: ExternCrate ( ..) | ItemKind :: Use ( ..) => {
233
233
let skip_unused_imports = item. attrs . iter ( ) . any ( |attr| attr. check_name ( sym ! ( macro_use) ) ) ;
234
234
235
- for attr in & item. attrs {
235
+ for attr in item. attrs {
236
236
if in_external_macro ( cx. sess ( ) , attr. span ) {
237
237
return ;
238
238
}
@@ -295,13 +295,13 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Attributes {
295
295
}
296
296
}
297
297
298
- fn check_impl_item ( & mut self , cx : & LateContext < ' a , ' tcx > , item : & ' tcx ImplItem ) {
298
+ fn check_impl_item ( & mut self , cx : & LateContext < ' a , ' tcx > , item : & ' tcx ImplItem < ' _ > ) {
299
299
if is_relevant_impl ( cx, item) {
300
300
check_attrs ( cx, item. span , item. ident . name , & item. attrs )
301
301
}
302
302
}
303
303
304
- fn check_trait_item ( & mut self , cx : & LateContext < ' a , ' tcx > , item : & ' tcx TraitItem ) {
304
+ fn check_trait_item ( & mut self , cx : & LateContext < ' a , ' tcx > , item : & ' tcx TraitItem < ' _ > ) {
305
305
if is_relevant_trait ( cx, item) {
306
306
check_attrs ( cx, item. span , item. ident . name , & item. attrs )
307
307
}
@@ -355,22 +355,22 @@ fn check_clippy_lint_names(cx: &LateContext<'_, '_>, items: &[NestedMetaItem]) {
355
355
}
356
356
}
357
357
358
- fn is_relevant_item ( cx : & LateContext < ' _ , ' _ > , item : & Item ) -> bool {
358
+ fn is_relevant_item ( cx : & LateContext < ' _ , ' _ > , item : & Item < ' _ > ) -> bool {
359
359
if let ItemKind :: Fn ( _, _, eid) = item. kind {
360
360
is_relevant_expr ( cx, cx. tcx . body_tables ( eid) , & cx. tcx . hir ( ) . body ( eid) . value )
361
361
} else {
362
362
true
363
363
}
364
364
}
365
365
366
- fn is_relevant_impl ( cx : & LateContext < ' _ , ' _ > , item : & ImplItem ) -> bool {
366
+ fn is_relevant_impl ( cx : & LateContext < ' _ , ' _ > , item : & ImplItem < ' _ > ) -> bool {
367
367
match item. kind {
368
368
ImplItemKind :: Method ( _, eid) => is_relevant_expr ( cx, cx. tcx . body_tables ( eid) , & cx. tcx . hir ( ) . body ( eid) . value ) ,
369
369
_ => false ,
370
370
}
371
371
}
372
372
373
- fn is_relevant_trait ( cx : & LateContext < ' _ , ' _ > , item : & TraitItem ) -> bool {
373
+ fn is_relevant_trait ( cx : & LateContext < ' _ , ' _ > , item : & TraitItem < ' _ > ) -> bool {
374
374
match item. kind {
375
375
TraitItemKind :: Method ( _, TraitMethod :: Required ( _) ) => true ,
376
376
TraitItemKind :: Method ( _, TraitMethod :: Provided ( eid) ) => {
0 commit comments