diff --git a/src/lifetimes.rs b/src/lifetimes.rs index b64fa148ef3..e39a41316a0 100644 --- a/src/lifetimes.rs +++ b/src/lifetimes.rs @@ -177,18 +177,10 @@ impl RefVisitor { } impl<'v> Visitor<'v> for RefVisitor { - // for lifetimes of references - fn visit_opt_lifetime_ref(&mut self, _: Span, lifetime: &'v Option) { - self.record(lifetime); - } - // for lifetimes as parameters of generics - fn visit_lifetime_ref(&mut self, lifetime: &'v Lifetime) { + fn visit_lifetime(&mut self, lifetime: &'v Lifetime) { self.record(&Some(*lifetime)); } - - // for lifetime bounds; the default impl calls visit_lifetime_ref - fn visit_lifetime_bound(&mut self, _: &'v Lifetime) { } } /// Are any lifetimes mentioned in the `where` clause? If yes, we don't try to