@@ -90,9 +90,7 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
9090
9191 fn visit_foreign_item ( & mut self , it : & ' a ast:: ForeignItem ) {
9292 self . with_lint_attrs ( it. id , & it. attrs , |cx| {
93- run_early_pass ! ( cx, check_foreign_item, it) ;
9493 ast_visit:: walk_foreign_item ( cx, it) ;
95- run_early_pass ! ( cx, check_foreign_item_post, it) ;
9694 } )
9795 }
9896
@@ -104,7 +102,6 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
104102 }
105103
106104 fn visit_anon_const ( & mut self , c : & ' a ast:: AnonConst ) {
107- run_early_pass ! ( self , check_anon_const, c) ;
108105 self . check_id ( c. id ) ;
109106 ast_visit:: walk_anon_const ( self , c) ;
110107 }
@@ -154,22 +151,17 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
154151 self . check_id ( closure_id) ;
155152 }
156153 }
157-
158- run_early_pass ! ( self , check_fn_post, fk, span, id) ;
159154 }
160155
161156 fn visit_variant_data ( & mut self , s : & ' a ast:: VariantData ) {
162- run_early_pass ! ( self , check_struct_def, s) ;
163157 if let Some ( ctor_hir_id) = s. ctor_id ( ) {
164158 self . check_id ( ctor_hir_id) ;
165159 }
166160 ast_visit:: walk_struct_def ( self , s) ;
167- run_early_pass ! ( self , check_struct_def_post, s) ;
168161 }
169162
170163 fn visit_field_def ( & mut self , s : & ' a ast:: FieldDef ) {
171164 self . with_lint_attrs ( s. id , & s. attrs , |cx| {
172- run_early_pass ! ( cx, check_field_def, s) ;
173165 ast_visit:: walk_field_def ( cx, s) ;
174166 } )
175167 }
@@ -178,7 +170,6 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
178170 self . with_lint_attrs ( v. id , & v. attrs , |cx| {
179171 run_early_pass ! ( cx, check_variant, v) ;
180172 ast_visit:: walk_variant ( cx, v) ;
181- run_early_pass ! ( cx, check_variant_post, v) ;
182173 } )
183174 }
184175
@@ -203,7 +194,6 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
203194 run_early_pass ! ( self , check_block, b) ;
204195 self . check_id ( b. id ) ;
205196 ast_visit:: walk_block ( self , b) ;
206- run_early_pass ! ( self , check_block_post, b) ;
207197 }
208198
209199 fn visit_arm ( & mut self , a : & ' a ast:: Arm ) {
@@ -214,8 +204,6 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
214204 }
215205
216206 fn visit_expr_post ( & mut self , e : & ' a ast:: Expr ) {
217- run_early_pass ! ( self , check_expr_post, e) ;
218-
219207 // Explicitly check for lints associated with 'closure_id', since
220208 // it does not have a corresponding AST node
221209 match e. kind {
@@ -242,7 +230,6 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
242230 }
243231
244232 fn visit_where_predicate ( & mut self , p : & ' a ast:: WherePredicate ) {
245- run_early_pass ! ( self , check_where_predicate, p) ;
246233 ast_visit:: walk_where_predicate ( self , p) ;
247234 }
248235
@@ -256,23 +243,19 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
256243 ast_visit:: AssocCtxt :: Trait => {
257244 run_early_pass ! ( cx, check_trait_item, item) ;
258245 ast_visit:: walk_assoc_item ( cx, item, ctxt) ;
259- run_early_pass ! ( cx, check_trait_item_post, item) ;
260246 }
261247 ast_visit:: AssocCtxt :: Impl => {
262248 run_early_pass ! ( cx, check_impl_item, item) ;
263249 ast_visit:: walk_assoc_item ( cx, item, ctxt) ;
264- run_early_pass ! ( cx, check_impl_item_post, item) ;
265250 }
266251 } ) ;
267252 }
268253
269254 fn visit_lifetime ( & mut self , lt : & ' a ast:: Lifetime , _: ast_visit:: LifetimeCtxt ) {
270- run_early_pass ! ( self , check_lifetime, lt) ;
271255 self . check_id ( lt. id ) ;
272256 }
273257
274258 fn visit_path ( & mut self , p : & ' a ast:: Path , id : ast:: NodeId ) {
275- run_early_pass ! ( self , check_path, p, id) ;
276259 self . check_id ( id) ;
277260 ast_visit:: walk_path ( self , p) ;
278261 }
0 commit comments