@@ -208,7 +208,7 @@ impl<'a> AstValidator<'a> {
208208 }
209209
210210 // Mirrors `visit::walk_ty`, but tracks relevant state.
211- fn walk_ty ( & mut self , t : & ' a Ty ) {
211+ fn walk_ty ( & mut self , t : & Ty ) {
212212 match & t. kind {
213213 TyKind :: ImplTrait ( _, bounds) => {
214214 self . with_impl_trait ( Some ( t. span ) , |this| visit:: walk_ty ( this, t) ) ;
@@ -731,7 +731,7 @@ impl<'a> AstValidator<'a> {
731731 /// C-variadics must be:
732732 /// - Non-const
733733 /// - Either foreign, or free and `unsafe extern "C"` semantically
734- fn check_c_variadic_type ( & self , fk : FnKind < ' a > , attrs : & ' a AttrVec ) {
734+ fn check_c_variadic_type ( & self , fk : FnKind < ' _ > , attrs : & AttrVec ) {
735735 // `...` is already rejected when it is not the final parameter.
736736 let variadic_param = match fk. decl ( ) . inputs . last ( ) {
737737 Some ( param) if matches ! ( param. ty. kind, TyKind :: CVarArgs ) => param,
@@ -806,7 +806,7 @@ impl<'a> AstValidator<'a> {
806806 fn check_c_variadic_abi (
807807 & self ,
808808 abi : ExternAbi ,
809- attrs : & ' a AttrVec ,
809+ attrs : & AttrVec ,
810810 dotdotdot_span : Span ,
811811 sig : & FnSig ,
812812 ) {
@@ -976,7 +976,7 @@ impl<'a> AstValidator<'a> {
976976 } ) ;
977977 }
978978
979- fn visit_ty_common ( & mut self , ty : & ' a Ty ) {
979+ fn visit_ty_common ( & mut self , ty : & Ty ) {
980980 match & ty. kind {
981981 TyKind :: FnPtr ( bfty) => {
982982 self . check_fn_ptr_safety ( bfty. decl_span , bfty. safety ) ;
@@ -1039,13 +1039,13 @@ impl<'a> AstValidator<'a> {
10391039 }
10401040
10411041 // Used within `visit_item` for item kinds where we don't call `visit::walk_item`.
1042- fn visit_attrs_vis ( & mut self , attrs : & ' a AttrVec , vis : & ' a Visibility ) {
1042+ fn visit_attrs_vis ( & mut self , attrs : & AttrVec , vis : & Visibility ) {
10431043 walk_list ! ( self , visit_attribute, attrs) ;
10441044 self . visit_vis ( vis) ;
10451045 }
10461046
10471047 // Used within `visit_item` for item kinds where we don't call `visit::walk_item`.
1048- fn visit_attrs_vis_ident ( & mut self , attrs : & ' a AttrVec , vis : & ' a Visibility , ident : & ' a Ident ) {
1048+ fn visit_attrs_vis_ident ( & mut self , attrs : & AttrVec , vis : & Visibility , ident : & Ident ) {
10491049 walk_list ! ( self , visit_attribute, attrs) ;
10501050 self . visit_vis ( vis) ;
10511051 self . visit_ident ( ident) ;
@@ -1125,17 +1125,17 @@ fn validate_generic_param_order(dcx: DiagCtxtHandle<'_>, generics: &[GenericPara
11251125 }
11261126}
11271127
1128- impl < ' a > Visitor < ' a > for AstValidator < ' a > {
1128+ impl Visitor < ' _ > for AstValidator < ' _ > {
11291129 fn visit_attribute ( & mut self , attr : & Attribute ) {
11301130 validate_attr:: check_attr ( & self . sess . psess , attr) ;
11311131 }
11321132
1133- fn visit_ty ( & mut self , ty : & ' a Ty ) {
1133+ fn visit_ty ( & mut self , ty : & Ty ) {
11341134 self . visit_ty_common ( ty) ;
11351135 self . walk_ty ( ty)
11361136 }
11371137
1138- fn visit_item ( & mut self , item : & ' a Item ) {
1138+ fn visit_item ( & mut self , item : & Item ) {
11391139 if item. attrs . iter ( ) . any ( |attr| attr. is_proc_macro_attr ( ) ) {
11401140 self . has_proc_macro_decls = true ;
11411141 }
@@ -1477,7 +1477,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
14771477 self . lint_node_id = previous_lint_node_id;
14781478 }
14791479
1480- fn visit_foreign_item ( & mut self , fi : & ' a ForeignItem ) {
1480+ fn visit_foreign_item ( & mut self , fi : & ForeignItem ) {
14811481 match & fi. kind {
14821482 ForeignItemKind :: Fn ( box Fn { defaultness, ident, sig, body, .. } ) => {
14831483 self . check_defaultness ( fi. span , * defaultness, AllowDefault :: No , AllowFinal :: No ) ;
@@ -1527,7 +1527,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
15271527 }
15281528
15291529 // Mirrors `visit::walk_generic_args`, but tracks relevant state.
1530- fn visit_generic_args ( & mut self , generic_args : & ' a GenericArgs ) {
1530+ fn visit_generic_args ( & mut self , generic_args : & GenericArgs ) {
15311531 match generic_args {
15321532 GenericArgs :: AngleBracketed ( data) => {
15331533 self . check_generic_args_before_constraints ( data) ;
@@ -1557,7 +1557,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
15571557 }
15581558 }
15591559
1560- fn visit_generics ( & mut self , generics : & ' a Generics ) {
1560+ fn visit_generics ( & mut self , generics : & Generics ) {
15611561 let mut prev_param_default = None ;
15621562 for param in & generics. params {
15631563 match param. kind {
@@ -1613,7 +1613,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
16131613 }
16141614 }
16151615
1616- fn visit_param_bound ( & mut self , bound : & ' a GenericBound , ctxt : BoundKind ) {
1616+ fn visit_param_bound ( & mut self , bound : & GenericBound , ctxt : BoundKind ) {
16171617 match bound {
16181618 GenericBound :: Trait ( trait_ref) => {
16191619 match ( ctxt, trait_ref. modifiers . constness , trait_ref. modifiers . polarity ) {
@@ -1671,7 +1671,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
16711671 visit:: walk_param_bound ( self , bound)
16721672 }
16731673
1674- fn visit_fn ( & mut self , fk : FnKind < ' a > , attrs : & AttrVec , span : Span , id : NodeId ) {
1674+ fn visit_fn ( & mut self , fk : FnKind < ' _ > , attrs : & AttrVec , span : Span , id : NodeId ) {
16751675 // Only associated `fn`s can have `self` parameters.
16761676 let self_semantic = match fk. ctxt ( ) {
16771677 Some ( FnCtxt :: Assoc ( _) ) => SelfSemantic :: Yes ,
@@ -1784,7 +1784,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
17841784 self . with_tilde_const ( disallowed, |this| visit:: walk_fn ( this, fk) ) ;
17851785 }
17861786
1787- fn visit_assoc_item ( & mut self , item : & ' a AssocItem , ctxt : AssocCtxt ) {
1787+ fn visit_assoc_item ( & mut self , item : & AssocItem , ctxt : AssocCtxt ) {
17881788 if let Some ( ident) = item. kind . ident ( )
17891789 && attr:: contains_name ( & item. attrs , sym:: no_mangle)
17901790 {
@@ -1931,7 +1931,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
19311931 }
19321932 }
19331933
1934- fn visit_anon_const ( & mut self , anon_const : & ' a AnonConst ) {
1934+ fn visit_anon_const ( & mut self , anon_const : & AnonConst ) {
19351935 self . with_tilde_const (
19361936 Some ( TildeConstReason :: AnonConst { span : anon_const. value . span } ) ,
19371937 |this| visit:: walk_anon_const ( this, anon_const) ,
0 commit comments