1
Fork 0

annotate stricter lifetimes on LateLintPass methods to allow them to forward to a Visitor

This commit is contained in:
Oliver Schneider 2016-12-06 11:26:52 +01:00
parent f7c93c07b8
commit 5e51edb0de
No known key found for this signature in database
GPG key ID: 56D6EEA0FC67AC46
31 changed files with 525 additions and 420 deletions

View file

@ -940,8 +940,8 @@ mod tests {
struct PatIdentVisitor {
spans: Vec<Span>
}
impl ::visit::Visitor for PatIdentVisitor {
fn visit_pat(&mut self, p: &ast::Pat) {
impl<'a> ::visit::Visitor<'a> for PatIdentVisitor {
fn visit_pat(&mut self, p: &'a ast::Pat) {
match p.node {
PatKind::Ident(_ , ref spannedident, _) => {
self.spans.push(spannedident.span.clone());