Honor lint level attributes in more places.
This extends the LintLevelBuilder to handle lint level attributes on struct expression fields and pattern fields. This also updates the early lints to honor lint levels on generic parameters.
This commit is contained in:
parent
b651c1cebe
commit
6c7cb2bb77
6 changed files with 1312 additions and 6 deletions
|
@ -219,9 +219,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);
|
||||
});
|
||||
}
|
||||
|
||||
fn visit_generics(&mut self, g: &'a ast::Generics) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue