@@ -90,9 +90,7 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
90
90
91
91
fn visit_foreign_item ( & mut self , it : & ' a ast:: ForeignItem ) {
92
92
self . with_lint_attrs ( it. id , & it. attrs , |cx| {
93
- run_early_pass ! ( cx, check_foreign_item, it) ;
94
93
ast_visit:: walk_foreign_item ( cx, it) ;
95
- run_early_pass ! ( cx, check_foreign_item_post, it) ;
96
94
} )
97
95
}
98
96
@@ -104,7 +102,6 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
104
102
}
105
103
106
104
fn visit_anon_const ( & mut self , c : & ' a ast:: AnonConst ) {
107
- run_early_pass ! ( self , check_anon_const, c) ;
108
105
self . check_id ( c. id ) ;
109
106
ast_visit:: walk_anon_const ( self , c) ;
110
107
}
@@ -154,22 +151,17 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
154
151
self . check_id ( closure_id) ;
155
152
}
156
153
}
157
-
158
- run_early_pass ! ( self , check_fn_post, fk, span, id) ;
159
154
}
160
155
161
156
fn visit_variant_data ( & mut self , s : & ' a ast:: VariantData ) {
162
- run_early_pass ! ( self , check_struct_def, s) ;
163
157
if let Some ( ctor_hir_id) = s. ctor_id ( ) {
164
158
self . check_id ( ctor_hir_id) ;
165
159
}
166
160
ast_visit:: walk_struct_def ( self , s) ;
167
- run_early_pass ! ( self , check_struct_def_post, s) ;
168
161
}
169
162
170
163
fn visit_field_def ( & mut self , s : & ' a ast:: FieldDef ) {
171
164
self . with_lint_attrs ( s. id , & s. attrs , |cx| {
172
- run_early_pass ! ( cx, check_field_def, s) ;
173
165
ast_visit:: walk_field_def ( cx, s) ;
174
166
} )
175
167
}
@@ -178,7 +170,6 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
178
170
self . with_lint_attrs ( v. id , & v. attrs , |cx| {
179
171
run_early_pass ! ( cx, check_variant, v) ;
180
172
ast_visit:: walk_variant ( cx, v) ;
181
- run_early_pass ! ( cx, check_variant_post, v) ;
182
173
} )
183
174
}
184
175
@@ -203,7 +194,6 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
203
194
run_early_pass ! ( self , check_block, b) ;
204
195
self . check_id ( b. id ) ;
205
196
ast_visit:: walk_block ( self , b) ;
206
- run_early_pass ! ( self , check_block_post, b) ;
207
197
}
208
198
209
199
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>
214
204
}
215
205
216
206
fn visit_expr_post ( & mut self , e : & ' a ast:: Expr ) {
217
- run_early_pass ! ( self , check_expr_post, e) ;
218
-
219
207
// Explicitly check for lints associated with 'closure_id', since
220
208
// it does not have a corresponding AST node
221
209
match e. kind {
@@ -242,7 +230,6 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
242
230
}
243
231
244
232
fn visit_where_predicate ( & mut self , p : & ' a ast:: WherePredicate ) {
245
- run_early_pass ! ( self , check_where_predicate, p) ;
246
233
ast_visit:: walk_where_predicate ( self , p) ;
247
234
}
248
235
@@ -256,23 +243,19 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
256
243
ast_visit:: AssocCtxt :: Trait => {
257
244
run_early_pass ! ( cx, check_trait_item, item) ;
258
245
ast_visit:: walk_assoc_item ( cx, item, ctxt) ;
259
- run_early_pass ! ( cx, check_trait_item_post, item) ;
260
246
}
261
247
ast_visit:: AssocCtxt :: Impl => {
262
248
run_early_pass ! ( cx, check_impl_item, item) ;
263
249
ast_visit:: walk_assoc_item ( cx, item, ctxt) ;
264
- run_early_pass ! ( cx, check_impl_item_post, item) ;
265
250
}
266
251
} ) ;
267
252
}
268
253
269
254
fn visit_lifetime ( & mut self , lt : & ' a ast:: Lifetime , _: ast_visit:: LifetimeCtxt ) {
270
- run_early_pass ! ( self , check_lifetime, lt) ;
271
255
self . check_id ( lt. id ) ;
272
256
}
273
257
274
258
fn visit_path ( & mut self , p : & ' a ast:: Path , id : ast:: NodeId ) {
275
- run_early_pass ! ( self , check_path, p, id) ;
276
259
self . check_id ( id) ;
277
260
ast_visit:: walk_path ( self , p) ;
278
261
}
0 commit comments