-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Visit attributes in more places. #96745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1b464c7
b651c1c
6c7cb2b
dcd5177
7b36047
c655f17
1c70b86
900a9d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,6 +101,12 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T> | |
run_early_pass!(self, check_pat_post, p); | ||
} | ||
|
||
fn visit_pat_field(&mut self, field: &'a ast::PatField) { | ||
self.with_lint_attrs(field.id, &field.attrs, |cx| { | ||
ast_visit::walk_pat_field(cx, field); | ||
}); | ||
} | ||
|
||
fn visit_anon_const(&mut self, c: &'a ast::AnonConst) { | ||
self.check_id(c.id); | ||
ast_visit::walk_anon_const(self, c); | ||
|
@@ -219,9 +225,10 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T> | |
} | ||
|
||
fn visit_generic_param(&mut self, param: &'a ast::GenericParam) { | ||
run_early_pass!(self, check_generic_param, param); | ||
self.check_id(param.id); | ||
ast_visit::walk_generic_param(self, param); | ||
self.with_lint_attrs(param.id, ¶m.attrs, |cx| { | ||
run_early_pass!(cx, check_generic_param, param); | ||
ast_visit::walk_generic_param(cx, param); | ||
}); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should there be similar modifications for expr field and pat fields? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
fn visit_generics(&mut self, g: &'a ast::Generics) { | ||
|
Uh oh!
There was an error while loading. Please reload this page.