|
15 | 15 | //! for all lint attributes. |
16 | 16 |
|
17 | 17 | use crate::{passes::LateLintPassObject, LateContext, LateLintPass, LintStore}; |
18 | | -use rustc_ast as ast; |
19 | 18 | use rustc_data_structures::stack::ensure_sufficient_stack; |
20 | 19 | use rustc_data_structures::sync::{join, Lrc}; |
21 | 20 | use rustc_hir as hir; |
@@ -62,13 +61,13 @@ impl<'tcx, T: LateLintPass<'tcx>> LateContextAndPass<'tcx, T> { |
62 | 61 | let prev = self.context.last_node_with_lint_attrs; |
63 | 62 | self.context.last_node_with_lint_attrs = id; |
64 | 63 | debug!("late context: enter_attrs({:?})", attrs); |
65 | | - lint_callback!(self, enter_lint_attrs, attrs); |
| 64 | + lint_callback!(self, check_attributes, attrs); |
66 | 65 | for attr in attrs { |
67 | 66 | lint_callback!(self, check_attribute, attr); |
68 | 67 | } |
69 | 68 | f(self); |
70 | 69 | debug!("late context: exit_attrs({:?})", attrs); |
71 | | - lint_callback!(self, exit_lint_attrs, attrs); |
| 70 | + lint_callback!(self, check_attributes_post, attrs); |
72 | 71 | self.context.last_node_with_lint_attrs = prev; |
73 | 72 | } |
74 | 73 |
|
@@ -310,10 +309,6 @@ impl<'tcx, T: LateLintPass<'tcx>> hir_visit::Visitor<'tcx> for LateContextAndPas |
310 | 309 | lint_callback!(self, check_path, p, id); |
311 | 310 | hir_visit::walk_path(self, p); |
312 | 311 | } |
313 | | - |
314 | | - fn visit_attribute(&mut self, attr: &'tcx ast::Attribute) { |
315 | | - lint_callback!(self, check_attribute, attr); |
316 | | - } |
317 | 312 | } |
318 | 313 |
|
319 | 314 | // Combines multiple lint passes into a single pass, at runtime. Each |
|
0 commit comments