@@ -83,8 +83,8 @@ declare_clippy_lint! {
83
83
84
84
declare_lint_pass ! ( PatternTypeMismatch => [ PATTERN_TYPE_MISMATCH ] ) ;
85
85
86
- impl < ' a , ' tcx > LateLintPass < ' a , ' tcx > for PatternTypeMismatch {
87
- fn check_stmt ( & mut self , cx : & LateContext < ' a , ' tcx > , stmt : & ' tcx Stmt < ' _ > ) {
86
+ impl < ' tcx > LateLintPass < ' tcx > for PatternTypeMismatch {
87
+ fn check_stmt ( & mut self , cx : & LateContext < ' tcx > , stmt : & ' tcx Stmt < ' _ > ) {
88
88
if let StmtKind :: Local ( ref local) = stmt. kind {
89
89
if let Some ( init) = & local. init {
90
90
if let Some ( init_ty) = cx. tables ( ) . node_type_opt ( init. hir_id ) {
@@ -102,7 +102,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PatternTypeMismatch {
102
102
}
103
103
}
104
104
105
- fn check_expr ( & mut self , cx : & LateContext < ' a , ' tcx > , expr : & ' tcx Expr < ' _ > ) {
105
+ fn check_expr ( & mut self , cx : & LateContext < ' tcx > , expr : & ' tcx Expr < ' _ > ) {
106
106
if let ExprKind :: Match ( ref expr, arms, source) = expr. kind {
107
107
match source {
108
108
MatchSource :: Normal | MatchSource :: IfLetDesugar { .. } | MatchSource :: WhileLetDesugar => {
@@ -125,7 +125,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PatternTypeMismatch {
125
125
126
126
fn check_fn (
127
127
& mut self ,
128
- cx : & LateContext < ' a , ' tcx > ,
128
+ cx : & LateContext < ' tcx > ,
129
129
_: intravisit:: FnKind < ' tcx > ,
130
130
_: & ' tcx FnDecl < ' _ > ,
131
131
body : & ' tcx Body < ' _ > ,
@@ -146,8 +146,8 @@ enum DerefPossible {
146
146
Impossible ,
147
147
}
148
148
149
- fn apply_lint < ' a , ' tcx > (
150
- cx : & LateContext < ' a , ' tcx > ,
149
+ fn apply_lint < ' tcx > (
150
+ cx : & LateContext < ' tcx > ,
151
151
pat : & Pat < ' _ > ,
152
152
expr_ty : Ty < ' tcx > ,
153
153
deref_possible : DerefPossible ,
@@ -185,8 +185,8 @@ enum Level {
185
185
}
186
186
187
187
#[ allow( rustc:: usage_of_ty_tykind) ]
188
- fn find_first_mismatch < ' a , ' tcx > (
189
- cx : & LateContext < ' a , ' tcx > ,
188
+ fn find_first_mismatch < ' tcx > (
189
+ cx : & LateContext < ' tcx > ,
190
190
pat : & Pat < ' _ > ,
191
191
ty : Ty < ' tcx > ,
192
192
level : Level ,
@@ -259,8 +259,8 @@ fn get_variant<'a>(adt_def: &'a AdtDef, qpath: &QPath<'_>) -> Option<&'a Variant
259
259
None
260
260
}
261
261
262
- fn find_first_mismatch_in_tuple < ' a , ' tcx , I > (
263
- cx : & LateContext < ' a , ' tcx > ,
262
+ fn find_first_mismatch_in_tuple < ' tcx , I > (
263
+ cx : & LateContext < ' tcx > ,
264
264
pats : & [ & Pat < ' _ > ] ,
265
265
ty_iter_src : I ,
266
266
) -> Option < ( Span , Mutability , Level ) >
@@ -284,8 +284,8 @@ where
284
284
None
285
285
}
286
286
287
- fn find_first_mismatch_in_struct < ' a , ' tcx > (
288
- cx : & LateContext < ' a , ' tcx > ,
287
+ fn find_first_mismatch_in_struct < ' tcx > (
288
+ cx : & LateContext < ' tcx > ,
289
289
field_pats : & [ FieldPat < ' _ > ] ,
290
290
field_defs : & [ FieldDef ] ,
291
291
substs_ref : SubstsRef < ' tcx > ,
0 commit comments