diff options
| author | llogiq <bogusandre@gmail.com> | 2016-02-11 18:19:18 +0100 |
|---|---|---|
| committer | llogiq <bogusandre@gmail.com> | 2016-02-11 18:19:18 +0100 |
| commit | d483a6e2484e7dff3c4279bb026a6da0f1e4ba1e (patch) | |
| tree | ebd1b72cb7f091a1e66d6d22fd975403a2663029 | |
| parent | a8fa8410cdda074f37dd948dc48efc20137d4d62 (diff) | |
| download | rust-d483a6e2484e7dff3c4279bb026a6da0f1e4ba1e.tar.gz rust-d483a6e2484e7dff3c4279bb026a6da0f1e4ba1e.zip | |
add item_post methods
| -rw-r--r-- | src/librustc/lint/context.rs | 2 | ||||
| -rw-r--r-- | src/librustc/lint/mod.rs | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/librustc/lint/context.rs b/src/librustc/lint/context.rs index a9acbeb46c4..6282a175e9a 100644 --- a/src/librustc/lint/context.rs +++ b/src/librustc/lint/context.rs @@ -758,6 +758,7 @@ impl<'a, 'tcx, 'v> hir_visit::Visitor<'v> for LateContext<'a, 'tcx> { run_lints!(cx, check_item, late_passes, it); cx.visit_ids(|v| v.visit_item(it)); hir_visit::walk_item(cx, it); + run_lints!(cx, check_item_post, late_passes, it); }) } @@ -919,6 +920,7 @@ impl<'a, 'v> ast_visit::Visitor<'v> for EarlyContext<'a> { run_lints!(cx, check_item, early_passes, it); cx.visit_ids(|v| v.visit_item(it)); ast_visit::walk_item(cx, it); + run_lints!(cx, check_item, early_passes, it); }) } diff --git a/src/librustc/lint/mod.rs b/src/librustc/lint/mod.rs index 612b23ff98e..5e2e8c4c6d5 100644 --- a/src/librustc/lint/mod.rs +++ b/src/librustc/lint/mod.rs @@ -136,6 +136,7 @@ pub trait LateLintPass: LintPass { fn check_mod(&mut self, _: &LateContext, _: &hir::Mod, _: Span, _: ast::NodeId) { } fn check_foreign_item(&mut self, _: &LateContext, _: &hir::ForeignItem) { } fn check_item(&mut self, _: &LateContext, _: &hir::Item) { } + fn check_item_post(&mut self, _: &LateContext, _: &hir::Item) { } fn check_local(&mut self, _: &LateContext, _: &hir::Local) { } fn check_block(&mut self, _: &LateContext, _: &hir::Block) { } fn check_block_post(&mut self, _: &LateContext, _: &hir::Block) { } @@ -180,6 +181,7 @@ pub trait EarlyLintPass: LintPass { fn check_mod(&mut self, _: &EarlyContext, _: &ast::Mod, _: Span, _: ast::NodeId) { } fn check_foreign_item(&mut self, _: &EarlyContext, _: &ast::ForeignItem) { } fn check_item(&mut self, _: &EarlyContext, _: &ast::Item) { } + fn check_item_post(&mut self, _: &EarlyContext, _: &ast::Item) { } fn check_local(&mut self, _: &EarlyContext, _: &ast::Local) { } fn check_block(&mut self, _: &EarlyContext, _: &ast::Block) { } fn check_block_post(&mut self, _: &EarlyContext, _: &ast::Block) { } |
