@@ -314,9 +314,9 @@ impl_lint_pass!(Types => [BOX_COLLECTION, VEC_BOX, OPTION_OPTION, LINKEDLIST, BO
314
314
impl < ' tcx > LateLintPass < ' tcx > for Types {
315
315
fn check_fn (
316
316
& mut self ,
317
- cx : & LateContext < ' _ > ,
317
+ cx : & LateContext < ' tcx > ,
318
318
fn_kind : FnKind < ' _ > ,
319
- decl : & FnDecl < ' _ > ,
319
+ decl : & FnDecl < ' tcx > ,
320
320
_: & Body < ' _ > ,
321
321
_: Span ,
322
322
def_id : LocalDefId ,
@@ -346,7 +346,7 @@ impl<'tcx> LateLintPass<'tcx> for Types {
346
346
) ;
347
347
}
348
348
349
- fn check_item ( & mut self , cx : & LateContext < ' tcx > , item : & ' tcx Item < ' _ > ) {
349
+ fn check_item ( & mut self , cx : & LateContext < ' tcx > , item : & ' tcx Item < ' tcx > ) {
350
350
let is_exported = cx. effective_visibilities . is_exported ( item. owner_id . def_id ) ;
351
351
352
352
match item. kind {
@@ -363,7 +363,7 @@ impl<'tcx> LateLintPass<'tcx> for Types {
363
363
}
364
364
}
365
365
366
- fn check_impl_item ( & mut self , cx : & LateContext < ' tcx > , item : & ' tcx ImplItem < ' _ > ) {
366
+ fn check_impl_item ( & mut self , cx : & LateContext < ' tcx > , item : & ' tcx ImplItem < ' tcx > ) {
367
367
match item. kind {
368
368
ImplItemKind :: Const ( ty, _) => {
369
369
let is_in_trait_impl = if let Some ( hir:: Node :: Item ( item) ) = cx
@@ -391,7 +391,7 @@ impl<'tcx> LateLintPass<'tcx> for Types {
391
391
}
392
392
}
393
393
394
- fn check_field_def ( & mut self , cx : & LateContext < ' _ > , field : & hir:: FieldDef < ' _ > ) {
394
+ fn check_field_def ( & mut self , cx : & LateContext < ' tcx > , field : & hir:: FieldDef < ' tcx > ) {
395
395
let is_exported = cx. effective_visibilities . is_exported ( field. def_id ) ;
396
396
397
397
self . check_ty (
@@ -404,7 +404,7 @@ impl<'tcx> LateLintPass<'tcx> for Types {
404
404
) ;
405
405
}
406
406
407
- fn check_trait_item ( & mut self , cx : & LateContext < ' tcx > , item : & TraitItem < ' _ > ) {
407
+ fn check_trait_item ( & mut self , cx : & LateContext < ' tcx > , item : & TraitItem < ' tcx > ) {
408
408
let is_exported = cx. effective_visibilities . is_exported ( item. owner_id . def_id ) ;
409
409
410
410
let context = CheckTyContext {
@@ -421,7 +421,7 @@ impl<'tcx> LateLintPass<'tcx> for Types {
421
421
}
422
422
}
423
423
424
- fn check_local ( & mut self , cx : & LateContext < ' _ > , local : & Local < ' _ > ) {
424
+ fn check_local ( & mut self , cx : & LateContext < ' tcx > , local : & Local < ' tcx > ) {
425
425
if let Some ( ty) = local. ty {
426
426
self . check_ty (
427
427
cx,
@@ -444,7 +444,7 @@ impl Types {
444
444
}
445
445
}
446
446
447
- fn check_fn_decl ( & mut self , cx : & LateContext < ' _ > , decl : & FnDecl < ' _ > , context : CheckTyContext ) {
447
+ fn check_fn_decl < ' tcx > ( & mut self , cx : & LateContext < ' tcx > , decl : & FnDecl < ' tcx > , context : CheckTyContext ) {
448
448
// Ignore functions in trait implementations as they are usually forced by the trait definition.
449
449
//
450
450
// FIXME: ideally we would like to warn *if the complicated type can be simplified*, but it's hard
@@ -466,7 +466,7 @@ impl Types {
466
466
/// lint found.
467
467
///
468
468
/// The parameter `is_local` distinguishes the context of the type.
469
- fn check_ty ( & mut self , cx : & LateContext < ' _ > , hir_ty : & hir:: Ty < ' _ > , mut context : CheckTyContext ) {
469
+ fn check_ty < ' tcx > ( & mut self , cx : & LateContext < ' tcx > , hir_ty : & hir:: Ty < ' tcx > , mut context : CheckTyContext ) {
470
470
if hir_ty. span . from_expansion ( ) {
471
471
return ;
472
472
}
0 commit comments