Consider lint check attributes on match arms in late lints
Additionally add analogous test for early lints.
This commit is contained in:
parent
19ca5692f6
commit
ddafe23401
5 changed files with 82 additions and 41 deletions
|
@ -240,8 +240,10 @@ impl<'tcx, T: LateLintPass<'tcx>> hir_visit::Visitor<'tcx> for LateContextAndPas
|
|||
}
|
||||
|
||||
fn visit_arm(&mut self, a: &'tcx hir::Arm<'tcx>) {
|
||||
lint_callback!(self, check_arm, a);
|
||||
hir_visit::walk_arm(self, a);
|
||||
self.with_lint_attrs(a.hir_id, |cx| {
|
||||
lint_callback!(cx, check_arm, a);
|
||||
hir_visit::walk_arm(cx, a);
|
||||
})
|
||||
}
|
||||
|
||||
fn visit_generic_param(&mut self, p: &'tcx hir::GenericParam<'tcx>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue