@@ -48,15 +48,15 @@ impl_lint_pass!(RedundantStaticLifetimes => [REDUNDANT_STATIC_LIFETIMES]);
48
48
49
49
impl RedundantStaticLifetimes {
50
50
// 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 ) {
52
52
match ty. kind {
53
53
// Be careful of nested structures (arrays and tuples)
54
54
TyKind :: Array ( ref ty, _) => {
55
- self . visit_type ( & * ty, cx, reason) ;
55
+ Self :: visit_type ( & * ty, cx, reason) ;
56
56
} ,
57
57
TyKind :: Tup ( ref tup) => {
58
58
for tup_ty in tup {
59
- self . visit_type ( & * tup_ty, cx, reason) ;
59
+ Self :: visit_type ( & * tup_ty, cx, reason) ;
60
60
}
61
61
} ,
62
62
// This is what we are looking for !
@@ -87,10 +87,10 @@ impl RedundantStaticLifetimes {
87
87
_ => { } ,
88
88
}
89
89
}
90
- self . visit_type ( & * borrow_type. ty , cx, reason) ;
90
+ Self :: visit_type ( & * borrow_type. ty , cx, reason) ;
91
91
} ,
92
92
TyKind :: Slice ( ref ty) => {
93
- self . visit_type ( ty, cx, reason) ;
93
+ Self :: visit_type ( ty, cx, reason) ;
94
94
} ,
95
95
_ => { } ,
96
96
}
0 commit comments