Skip to content

Commit d483a6e

Browse files
committed
add item_post methods
1 parent a8fa841 commit d483a6e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/librustc/lint/context.rs

+2
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,7 @@ impl<'a, 'tcx, 'v> hir_visit::Visitor<'v> for LateContext<'a, 'tcx> {
758758
run_lints!(cx, check_item, late_passes, it);
759759
cx.visit_ids(|v| v.visit_item(it));
760760
hir_visit::walk_item(cx, it);
761+
run_lints!(cx, check_item_post, late_passes, it);
761762
})
762763
}
763764

@@ -919,6 +920,7 @@ impl<'a, 'v> ast_visit::Visitor<'v> for EarlyContext<'a> {
919920
run_lints!(cx, check_item, early_passes, it);
920921
cx.visit_ids(|v| v.visit_item(it));
921922
ast_visit::walk_item(cx, it);
923+
run_lints!(cx, check_item, early_passes, it);
922924
})
923925
}
924926

src/librustc/lint/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ pub trait LateLintPass: LintPass {
136136
fn check_mod(&mut self, _: &LateContext, _: &hir::Mod, _: Span, _: ast::NodeId) { }
137137
fn check_foreign_item(&mut self, _: &LateContext, _: &hir::ForeignItem) { }
138138
fn check_item(&mut self, _: &LateContext, _: &hir::Item) { }
139+
fn check_item_post(&mut self, _: &LateContext, _: &hir::Item) { }
139140
fn check_local(&mut self, _: &LateContext, _: &hir::Local) { }
140141
fn check_block(&mut self, _: &LateContext, _: &hir::Block) { }
141142
fn check_block_post(&mut self, _: &LateContext, _: &hir::Block) { }
@@ -180,6 +181,7 @@ pub trait EarlyLintPass: LintPass {
180181
fn check_mod(&mut self, _: &EarlyContext, _: &ast::Mod, _: Span, _: ast::NodeId) { }
181182
fn check_foreign_item(&mut self, _: &EarlyContext, _: &ast::ForeignItem) { }
182183
fn check_item(&mut self, _: &EarlyContext, _: &ast::Item) { }
184+
fn check_item_post(&mut self, _: &EarlyContext, _: &ast::Item) { }
183185
fn check_local(&mut self, _: &EarlyContext, _: &ast::Local) { }
184186
fn check_block(&mut self, _: &EarlyContext, _: &ast::Block) { }
185187
fn check_block_post(&mut self, _: &EarlyContext, _: &ast::Block) { }

0 commit comments

Comments
 (0)