diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-09-13 19:44:47 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-09-13 19:47:20 +0000 |
| commit | 01d7bf09f380236f6eb059d33971d7bf0d755531 (patch) | |
| tree | 03889e52c03038ff440255150e0488c9eb47ae57 /compiler/rustc_lint/src/late.rs | |
| parent | ffc48e3eda36e288f76b4022d72d94321887ebf5 (diff) | |
| download | rust-01d7bf09f380236f6eb059d33971d7bf0d755531.tar.gz rust-01d7bf09f380236f6eb059d33971d7bf0d755531.zip | |
Visit ExprField for lint levels.
Diffstat (limited to 'compiler/rustc_lint/src/late.rs')
| -rw-r--r-- | compiler/rustc_lint/src/late.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/late.rs b/compiler/rustc_lint/src/late.rs index 73af51d9e90..43f668ca122 100644 --- a/compiler/rustc_lint/src/late.rs +++ b/compiler/rustc_lint/src/late.rs @@ -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| { |
