@@ -48,15 +48,15 @@ impl_lint_pass!(RedundantStaticLifetimes => [REDUNDANT_STATIC_LIFETIMES]);
4848
4949impl RedundantStaticLifetimes {
5050 // Recursively visit types
51- fn visit_type ( & mut self , ty : & Ty , cx : & EarlyContext < ' _ > , reason : & str ) {
51+ fn visit_type ( ty : & Ty , cx : & EarlyContext < ' _ > , reason : & str ) {
5252 match ty. kind {
5353 // Be careful of nested structures (arrays and tuples)
5454 TyKind :: Array ( ref ty, _) => {
55- self . visit_type ( & * ty, cx, reason) ;
55+ Self :: visit_type ( & * ty, cx, reason) ;
5656 } ,
5757 TyKind :: Tup ( ref tup) => {
5858 for tup_ty in tup {
59- self . visit_type ( & * tup_ty, cx, reason) ;
59+ Self :: visit_type ( & * tup_ty, cx, reason) ;
6060 }
6161 } ,
6262 // This is what we are looking for !
@@ -87,10 +87,10 @@ impl RedundantStaticLifetimes {
8787 _ => { } ,
8888 }
8989 }
90- self . visit_type ( & * borrow_type. ty , cx, reason) ;
90+ Self :: visit_type ( & * borrow_type. ty , cx, reason) ;
9191 } ,
9292 TyKind :: Slice ( ref ty) => {
93- self . visit_type ( ty, cx, reason) ;
93+ Self :: visit_type ( ty, cx, reason) ;
9494 } ,
9595 _ => { } ,
9696 }
@@ -105,13 +105,13 @@ impl EarlyLintPass for RedundantStaticLifetimes {
105105
106106 if !item. span . from_expansion ( ) {
107107 if let ItemKind :: Const ( _, ref var_type, _) = item. kind {
108- self . visit_type ( var_type, cx, "constants have by default a `'static` lifetime" ) ;
108+ Self :: visit_type ( var_type, cx, "constants have by default a `'static` lifetime" ) ;
109109 // Don't check associated consts because `'static` cannot be elided on those (issue
110110 // #2438)
111111 }
112112
113113 if let ItemKind :: Static ( ref var_type, _, _) = item. kind {
114- self . visit_type ( var_type, cx, "statics have by default a `'static` lifetime" ) ;
114+ Self :: visit_type ( var_type, cx, "statics have by default a `'static` lifetime" ) ;
115115 }
116116 }
117117 }
0 commit comments