@@ -187,7 +187,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Functions {
187
187
cx : & LateContext < ' a , ' tcx > ,
188
188
kind : intravisit:: FnKind < ' tcx > ,
189
189
decl : & ' tcx hir:: FnDecl ,
190
- body : & ' tcx hir:: Body ,
190
+ body : & ' tcx hir:: Body < ' _ > ,
191
191
span : Span ,
192
192
hir_id : hir:: HirId ,
193
193
) {
@@ -227,7 +227,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Functions {
227
227
self . check_line_number ( cx, span, body) ;
228
228
}
229
229
230
- fn check_item ( & mut self , cx : & LateContext < ' a , ' tcx > , item : & ' tcx hir:: Item ) {
230
+ fn check_item ( & mut self , cx : & LateContext < ' a , ' tcx > , item : & ' tcx hir:: Item < ' _ > ) {
231
231
let attr = must_use_attr ( & item. attrs ) ;
232
232
if let hir:: ItemKind :: Fn ( ref sig, ref _generics, ref body_id) = item. kind {
233
233
if let Some ( attr) = attr {
@@ -249,7 +249,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Functions {
249
249
}
250
250
}
251
251
252
- fn check_impl_item ( & mut self , cx : & LateContext < ' a , ' tcx > , item : & ' tcx hir:: ImplItem ) {
252
+ fn check_impl_item ( & mut self , cx : & LateContext < ' a , ' tcx > , item : & ' tcx hir:: ImplItem < ' _ > ) {
253
253
if let hir:: ImplItemKind :: Method ( ref sig, ref body_id) = item. kind {
254
254
let attr = must_use_attr ( & item. attrs ) ;
255
255
if let Some ( attr) = attr {
@@ -272,7 +272,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Functions {
272
272
}
273
273
}
274
274
275
- fn check_trait_item ( & mut self , cx : & LateContext < ' a , ' tcx > , item : & ' tcx hir:: TraitItem ) {
275
+ fn check_trait_item ( & mut self , cx : & LateContext < ' a , ' tcx > , item : & ' tcx hir:: TraitItem < ' _ > ) {
276
276
if let hir:: TraitItemKind :: Method ( ref sig, ref eid) = item. kind {
277
277
// don't lint extern functions decls, it's not their fault
278
278
if sig. header . abi == Abi :: Rust {
@@ -317,7 +317,7 @@ impl<'a, 'tcx> Functions {
317
317
}
318
318
}
319
319
320
- fn check_line_number ( self , cx : & LateContext < ' _ , ' _ > , span : Span , body : & ' tcx hir:: Body ) {
320
+ fn check_line_number ( self , cx : & LateContext < ' _ , ' _ > , span : Span , body : & ' tcx hir:: Body < ' _ > ) {
321
321
if in_external_macro ( cx. sess ( ) , span) {
322
322
return ;
323
323
}
@@ -375,7 +375,7 @@ impl<'a, 'tcx> Functions {
375
375
cx : & LateContext < ' a , ' tcx > ,
376
376
unsafety : hir:: Unsafety ,
377
377
decl : & ' tcx hir:: FnDecl ,
378
- body : & ' tcx hir:: Body ,
378
+ body : & ' tcx hir:: Body < ' _ > ,
379
379
hir_id : hir:: HirId ,
380
380
) {
381
381
let expr = & body. value ;
@@ -439,7 +439,7 @@ fn check_needless_must_use(
439
439
fn check_must_use_candidate < ' a , ' tcx > (
440
440
cx : & LateContext < ' a , ' tcx > ,
441
441
decl : & ' tcx hir:: FnDecl ,
442
- body : & ' tcx hir:: Body ,
442
+ body : & ' tcx hir:: Body < ' _ > ,
443
443
item_span : Span ,
444
444
item_id : hir:: HirId ,
445
445
fn_span : Span ,
@@ -521,7 +521,7 @@ fn is_must_use_ty<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: Ty<'tcx>) -> bool {
521
521
}
522
522
}
523
523
524
- fn has_mutable_arg ( cx : & LateContext < ' _ , ' _ > , body : & hir:: Body ) -> bool {
524
+ fn has_mutable_arg ( cx : & LateContext < ' _ , ' _ > , body : & hir:: Body < ' _ > ) -> bool {
525
525
let mut tys = FxHashSet :: default ( ) ;
526
526
body. params . iter ( ) . any ( |param| is_mutable_pat ( cx, & param. pat , & mut tys) )
527
527
}
@@ -686,7 +686,7 @@ fn is_mutated_static(cx: &LateContext<'_, '_>, e: &hir::Expr) -> bool {
686
686
}
687
687
}
688
688
689
- fn mutates_static < ' a , ' tcx > ( cx : & ' a LateContext < ' a , ' tcx > , body : & ' tcx hir:: Body ) -> bool {
689
+ fn mutates_static < ' a , ' tcx > ( cx : & ' a LateContext < ' a , ' tcx > , body : & ' tcx hir:: Body < ' _ > ) -> bool {
690
690
let mut v = StaticMutVisitor {
691
691
cx,
692
692
mutates_static : false ,
0 commit comments