diff options
| author | Michael Goulet <michael@errs.io> | 2025-03-13 00:22:16 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-03-13 00:22:30 +0000 |
| commit | 8bf33c213fe752a5a9f6fbc2594316dcbdd5a262 (patch) | |
| tree | 41496c47046ecd592ceb54517f01fc330629505f /compiler/rustc_lint/src/levels.rs | |
| parent | 0998d4095b0f11061f78a3f9c77a87838a4c1cb7 (diff) | |
| download | rust-8bf33c213fe752a5a9f6fbc2594316dcbdd5a262.tar.gz rust-8bf33c213fe752a5a9f6fbc2594316dcbdd5a262.zip | |
Visit PatField when collecting lint levels
Diffstat (limited to 'compiler/rustc_lint/src/levels.rs')
| -rw-r--r-- | compiler/rustc_lint/src/levels.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/levels.rs b/compiler/rustc_lint/src/levels.rs index 4ede9b44087..42b771471d0 100644 --- a/compiler/rustc_lint/src/levels.rs +++ b/compiler/rustc_lint/src/levels.rs @@ -299,6 +299,11 @@ impl<'tcx> Visitor<'tcx> for LintLevelsBuilder<'_, LintLevelQueryMap<'tcx>> { intravisit::walk_expr(self, e); } + fn visit_pat_field(&mut self, f: &'tcx hir::PatField<'tcx>) -> Self::Result { + self.add_id(f.hir_id); + intravisit::walk_pat_field(self, f); + } + fn visit_expr_field(&mut self, f: &'tcx hir::ExprField<'tcx>) { self.add_id(f.hir_id); intravisit::walk_expr_field(self, f); |
