Trait rustc::lint::LateLintPass
[−]
[src]
pub trait LateLintPass<'a, 'tcx>: LintPass { fn check_body(&mut self, _: &LateContext, _: &'tcx Body) { ... } fn check_body_post(&mut self, _: &LateContext, _: &'tcx Body) { ... } fn check_name(&mut self, _: &LateContext, _: Span, _: Name) { ... } fn check_crate(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Crate) { ... } fn check_crate_post(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Crate) { ... } fn check_mod(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx Mod,
_: Span,
_: NodeId) { ... } fn check_mod_post(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx Mod,
_: Span,
_: NodeId) { ... } fn check_foreign_item(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx ForeignItem) { ... } fn check_foreign_item_post(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx ForeignItem) { ... } fn check_item(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Item) { ... } fn check_item_post(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Item) { ... } fn check_local(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Local) { ... } fn check_block(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Block) { ... } fn check_block_post(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Block) { ... } fn check_stmt(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Stmt) { ... } fn check_arm(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Arm) { ... } fn check_pat(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Pat) { ... } fn check_decl(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Decl) { ... } fn check_expr(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Expr) { ... } fn check_expr_post(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Expr) { ... } fn check_ty(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Ty) { ... } fn check_generics(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Generics) { ... } fn check_fn(&mut self,
_: &LateContext<'a, 'tcx>,
_: FnKind<'tcx>,
_: &'tcx FnDecl,
_: &'tcx Body,
_: Span,
_: NodeId) { ... } fn check_fn_post(&mut self,
_: &LateContext<'a, 'tcx>,
_: FnKind<'tcx>,
_: &'tcx FnDecl,
_: &'tcx Body,
_: Span,
_: NodeId) { ... } fn check_trait_item(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx TraitItem) { ... } fn check_trait_item_post(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx TraitItem) { ... } fn check_impl_item(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx ImplItem) { ... } fn check_impl_item_post(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx ImplItem) { ... } fn check_struct_def(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx VariantData,
_: Name,
_: &'tcx Generics,
_: NodeId) { ... } fn check_struct_def_post(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx VariantData,
_: Name,
_: &'tcx Generics,
_: NodeId) { ... } fn check_struct_field(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx StructField) { ... } fn check_variant(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx Variant,
_: &'tcx Generics) { ... } fn check_variant_post(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx Variant,
_: &'tcx Generics) { ... } fn check_lifetime(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Lifetime) { ... } fn check_lifetime_def(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx LifetimeDef) { ... } fn check_path(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx Path,
_: NodeId) { ... } fn check_attribute(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Attribute) { ... } fn enter_lint_attrs(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx [Attribute]) { ... } fn exit_lint_attrs(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx [Attribute]) { ... } }
🔬 This is a nightly-only experimental API. (
rustc_private
)Trait for types providing lint checks.
Each check
method checks a single syntax node, and should not
invoke methods recursively (unlike Visitor
). By default they
do nothing.
Provided Methods
fn check_body(&mut self, _: &LateContext, _: &'tcx Body)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_body_post(&mut self, _: &LateContext, _: &'tcx Body)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_name(&mut self, _: &LateContext, _: Span, _: Name)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_crate(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Crate)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_crate_post(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Crate)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_mod(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx Mod,
_: Span,
_: NodeId)
_: &LateContext<'a, 'tcx>,
_: &'tcx Mod,
_: Span,
_: NodeId)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_mod_post(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx Mod,
_: Span,
_: NodeId)
_: &LateContext<'a, 'tcx>,
_: &'tcx Mod,
_: Span,
_: NodeId)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_foreign_item(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx ForeignItem)
_: &LateContext<'a, 'tcx>,
_: &'tcx ForeignItem)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_foreign_item_post(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx ForeignItem)
_: &LateContext<'a, 'tcx>,
_: &'tcx ForeignItem)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_item(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Item)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_item_post(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Item)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_local(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Local)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_block(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Block)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_block_post(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Block)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_stmt(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Stmt)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_arm(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Arm)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_pat(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Pat)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_decl(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Decl)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_expr(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Expr)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_expr_post(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Expr)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_ty(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Ty)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_generics(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Generics)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_fn(&mut self,
_: &LateContext<'a, 'tcx>,
_: FnKind<'tcx>,
_: &'tcx FnDecl,
_: &'tcx Body,
_: Span,
_: NodeId)
_: &LateContext<'a, 'tcx>,
_: FnKind<'tcx>,
_: &'tcx FnDecl,
_: &'tcx Body,
_: Span,
_: NodeId)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_fn_post(&mut self,
_: &LateContext<'a, 'tcx>,
_: FnKind<'tcx>,
_: &'tcx FnDecl,
_: &'tcx Body,
_: Span,
_: NodeId)
_: &LateContext<'a, 'tcx>,
_: FnKind<'tcx>,
_: &'tcx FnDecl,
_: &'tcx Body,
_: Span,
_: NodeId)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_trait_item(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx TraitItem)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_trait_item_post(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx TraitItem)
_: &LateContext<'a, 'tcx>,
_: &'tcx TraitItem)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_impl_item(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx ImplItem)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_impl_item_post(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx ImplItem)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_struct_def(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx VariantData,
_: Name,
_: &'tcx Generics,
_: NodeId)
_: &LateContext<'a, 'tcx>,
_: &'tcx VariantData,
_: Name,
_: &'tcx Generics,
_: NodeId)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_struct_def_post(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx VariantData,
_: Name,
_: &'tcx Generics,
_: NodeId)
_: &LateContext<'a, 'tcx>,
_: &'tcx VariantData,
_: Name,
_: &'tcx Generics,
_: NodeId)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_struct_field(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx StructField)
_: &LateContext<'a, 'tcx>,
_: &'tcx StructField)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_variant(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx Variant,
_: &'tcx Generics)
_: &LateContext<'a, 'tcx>,
_: &'tcx Variant,
_: &'tcx Generics)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_variant_post(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx Variant,
_: &'tcx Generics)
_: &LateContext<'a, 'tcx>,
_: &'tcx Variant,
_: &'tcx Generics)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_lifetime(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Lifetime)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_lifetime_def(&mut self,
_: &LateContext<'a, 'tcx>,
_: &'tcx LifetimeDef)
_: &LateContext<'a, 'tcx>,
_: &'tcx LifetimeDef)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_path(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Path, _: NodeId)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_attribute(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx Attribute)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn enter_lint_attrs(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx [Attribute])
🔬 This is a nightly-only experimental API. (
rustc_private
)Called when entering a syntax node that can have lint attributes such
as #[allow(...)]
. Called with all the attributes of that node.
fn exit_lint_attrs(&mut self, _: &LateContext<'a, 'tcx>, _: &'tcx [Attribute])
🔬 This is a nightly-only experimental API. (
rustc_private
)Counterpart to enter_lint_attrs
.
Implementors
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for HardwiredLints