Skip to content

Commit e3d1f15

Browse files
authored
Unrolled build for #142305
Rollup merge of #142305 - GuillaumeGomez:remove-visit_id-EarlyContextAndPass, r=oli-obk Remove unneeded `check_id` calls as they are already called in `visit_id` in `EarlyContextAndPass` type Follow-up from [this message](https://github.com/rust-lang/rust/pull/142240/files#r2137474724). Since `check_id` is already called in `visit_id` which is supposed to be called for each item with an ID, we don't need to manually call `check_id`. r? `@oli-obk`
2 parents e703dff + 6f958ac commit e3d1f15

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)