@@ -64,8 +64,8 @@ impl fmt::Display for BreakContextKind {
64
64
}
65
65
66
66
#[ derive( Clone ) ]
67
- struct CheckLoopVisitor < ' a , ' tcx > {
68
- sess : & ' a Session ,
67
+ struct CheckLoopVisitor < ' tcx > {
68
+ sess : & ' tcx Session ,
69
69
tcx : TyCtxt < ' tcx > ,
70
70
// Keep track of a stack of contexts, so that suggestions
71
71
// are not made for contexts where it would be incorrect,
@@ -90,7 +90,7 @@ pub(crate) fn provide(providers: &mut Providers) {
90
90
* providers = Providers { check_mod_loops, ..* providers } ;
91
91
}
92
92
93
- impl < ' a , ' hir > Visitor < ' hir > for CheckLoopVisitor < ' a , ' hir > {
93
+ impl < ' hir > Visitor < ' hir > for CheckLoopVisitor < ' hir > {
94
94
type NestedFilter = nested_filter:: OnlyBodies ;
95
95
96
96
fn nested_visit_map ( & mut self ) -> Self :: Map {
@@ -129,7 +129,7 @@ impl<'a, 'hir> Visitor<'hir> for CheckLoopVisitor<'a, 'hir> {
129
129
hir:: ExprKind :: If ( cond, then, else_opt) => {
130
130
self . visit_expr ( cond) ;
131
131
132
- let get_block = |ck_loop : & CheckLoopVisitor < ' a , ' hir > ,
132
+ let get_block = |ck_loop : & CheckLoopVisitor < ' hir > ,
133
133
expr : & hir:: Expr < ' hir > |
134
134
-> Option < & hir:: Block < ' hir > > {
135
135
if let hir:: ExprKind :: Block ( b, None ) = expr. kind
@@ -306,10 +306,10 @@ impl<'a, 'hir> Visitor<'hir> for CheckLoopVisitor<'a, 'hir> {
306
306
}
307
307
}
308
308
309
- impl < ' a , ' hir > CheckLoopVisitor < ' a , ' hir > {
309
+ impl < ' hir > CheckLoopVisitor < ' hir > {
310
310
fn with_context < F > ( & mut self , cx : Context , f : F )
311
311
where
312
- F : FnOnce ( & mut CheckLoopVisitor < ' a , ' hir > ) ,
312
+ F : FnOnce ( & mut CheckLoopVisitor < ' hir > ) ,
313
313
{
314
314
self . cx_stack . push ( cx) ;
315
315
f ( self ) ;
0 commit comments