about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-06-10 20:09:06 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2025-06-10 20:09:37 +0200
commit6f958ac88fbf83a1b45d2eff59aedf681b4f6723 (patch)
treed5644f24a95a494c2a80f68da3d3c61d15348fbd
parent40daf23eeb711dadf140b2536e67e3ff4c999196 (diff)
downloadrust-6f958ac88fbf83a1b45d2eff59aedf681b4f6723.tar.gz
rust-6f958ac88fbf83a1b45d2eff59aedf681b4f6723.zip
Remove unneeded `check_id` calls as they are already called in `visit_id` in `EarlyContextAndPass` type
-rw-r--r--compiler/rustc_lint/src/early.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/early.rs b/compiler/rustc_lint/src/early.rs
index 4978f293ab7..12666d383f9 100644
--- a/compiler/rustc_lint/src/early.rs
+++ b/compiler/rustc_lint/src/early.rs
@@ -136,7 +136,6 @@ impl<'ast, 'ecx, 'tcx, T: EarlyLintPass> ast_visit::Visitor<'ast>
         // the AST struct that they wrap (e.g. an item)
         self.with_lint_attrs(s.id, s.attrs(), |cx| {
             lint_callback!(cx, check_stmt, s);
-            cx.check_id(s.id);
         });
         // The visitor for the AST struct wrapped
         // by the statement (e.g. `Item`) will call
@@ -147,7 +146,6 @@ impl<'ast, 'ecx, 'tcx, T: EarlyLintPass> ast_visit::Visitor<'ast>
 
     fn visit_fn(&mut self, fk: ast_visit::FnKind<'ast>, span: Span, id: ast::NodeId) {
         lint_callback!(self, check_fn, fk, span, id);
-        self.check_id(id);
         ast_visit::walk_fn(self, fk);
     }