Visit ExprField for lint levels.

This commit is contained in:
Camille GILLOT
2023-09-13 19:44:47 +00:00
parent ffc48e3eda
commit 01d7bf09f3
3 changed files with 24 additions and 0 deletions

View File

@@ -157,6 +157,10 @@ impl<'tcx, T: LateLintPass<'tcx>> hir_visit::Visitor<'tcx> for LateContextAndPas
hir_visit::walk_pat(self, p);
}
fn visit_expr_field(&mut self, field: &'tcx hir::ExprField<'tcx>) {
self.with_lint_attrs(field.hir_id, |cx| hir_visit::walk_expr_field(cx, field))
}
fn visit_expr(&mut self, e: &'tcx hir::Expr<'tcx>) {
ensure_sufficient_stack(|| {
self.with_lint_attrs(e.hir_id, |cx| {