1
Fork 0

Introduce LifetimeCtxt.

This commit is contained in:
Camille GILLOT 2022-05-10 19:56:46 +02:00
parent 52cc779524
commit 5953c57f27
6 changed files with 23 additions and 11 deletions

View file

@ -1070,7 +1070,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
visit::walk_label(self, label);
}
fn visit_lifetime(&mut self, lifetime: &'a Lifetime) {
fn visit_lifetime(&mut self, lifetime: &'a Lifetime, _: visit::LifetimeCtxt) {
self.check_lifetime(lifetime.ident);
visit::walk_lifetime(self, lifetime);
}

View file

@ -106,7 +106,7 @@ impl<'ast> Visitor<'ast> for NodeCounter {
self.count += 1;
walk_variant(self, v)
}
fn visit_lifetime(&mut self, lifetime: &Lifetime) {
fn visit_lifetime(&mut self, lifetime: &Lifetime, _: visit::LifetimeCtxt) {
self.count += 1;
walk_lifetime(self, lifetime)
}