Skip to content

Commit 6f958ac

Browse files
Remove unneeded check_id calls as they are already called in visit_id in EarlyContextAndPass type
1 parent 40daf23 commit 6f958ac

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

compiler/rustc_lint/src/early.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ impl<'ast, 'ecx, 'tcx, T: EarlyLintPass> ast_visit::Visitor<'ast>
136136
// the AST struct that they wrap (e.g. an item)
137137
self.with_lint_attrs(s.id, s.attrs(), |cx| {
138138
lint_callback!(cx, check_stmt, s);
139-
cx.check_id(s.id);
140139
});
141140
// The visitor for the AST struct wrapped
142141
// by the statement (e.g. `Item`) will call
@@ -147,7 +146,6 @@ impl<'ast, 'ecx, 'tcx, T: EarlyLintPass> ast_visit::Visitor<'ast>
147146

148147
fn visit_fn(&mut self, fk: ast_visit::FnKind<'ast>, span: Span, id: ast::NodeId) {
149148
lint_callback!(self, check_fn, fk, span, id);
150-
self.check_id(id);
151149
ast_visit::walk_fn(self, fk);
152150
}
153151

0 commit comments

Comments
 (0)