Rename {enter,exit}_lint_attrs to check_attributes{,_post}
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
//! for all lint attributes.
|
||||
|
||||
use crate::{passes::LateLintPassObject, LateContext, LateLintPass, LintStore};
|
||||
use rustc_ast as ast;
|
||||
use rustc_data_structures::stack::ensure_sufficient_stack;
|
||||
use rustc_data_structures::sync::{join, Lrc};
|
||||
use rustc_hir as hir;
|
||||
@@ -62,13 +61,13 @@ impl<'tcx, T: LateLintPass<'tcx>> LateContextAndPass<'tcx, T> {
|
||||
let prev = self.context.last_node_with_lint_attrs;
|
||||
self.context.last_node_with_lint_attrs = id;
|
||||
debug!("late context: enter_attrs({:?})", attrs);
|
||||
lint_callback!(self, enter_lint_attrs, attrs);
|
||||
lint_callback!(self, check_attributes, attrs);
|
||||
for attr in attrs {
|
||||
lint_callback!(self, check_attribute, attr);
|
||||
}
|
||||
f(self);
|
||||
debug!("late context: exit_attrs({:?})", attrs);
|
||||
lint_callback!(self, exit_lint_attrs, attrs);
|
||||
lint_callback!(self, check_attributes_post, attrs);
|
||||
self.context.last_node_with_lint_attrs = prev;
|
||||
}
|
||||
|
||||
@@ -310,10 +309,6 @@ impl<'tcx, T: LateLintPass<'tcx>> hir_visit::Visitor<'tcx> for LateContextAndPas
|
||||
lint_callback!(self, check_path, p, id);
|
||||
hir_visit::walk_path(self, p);
|
||||
}
|
||||
|
||||
fn visit_attribute(&mut self, attr: &'tcx ast::Attribute) {
|
||||
lint_callback!(self, check_attribute, attr);
|
||||
}
|
||||
}
|
||||
|
||||
// Combines multiple lint passes into a single pass, at runtime. Each
|
||||
|
||||
Reference in New Issue
Block a user