Trait rustc_lint::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, Symbol) { ... } 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 Spanned<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 Spanned<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,
Symbol,
&'tcx Generics,
NodeId) { ... } fn check_struct_def_post(&mut self,
&LateContext<'a, 'tcx>,
&'tcx VariantData,
Symbol,
&'tcx Generics,
NodeId) { ... } fn check_struct_field(&mut self, &LateContext<'a, 'tcx>, &'tcx StructField) { ... } fn check_variant(&mut self,
&LateContext<'a, 'tcx>,
&'tcx Spanned<Variant_>,
&'tcx Generics) { ... } fn check_variant_post(&mut self,
&LateContext<'a, 'tcx>,
&'tcx Spanned<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, Symbol)
🔬 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)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_mod_post(&mut self, &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)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_foreign_item_post(&mut self, &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 Spanned<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 Spanned<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)
🔬 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,
Symbol,
&'tcx Generics,
NodeId)
&LateContext<'a, 'tcx>,
&'tcx VariantData,
Symbol,
&'tcx Generics,
NodeId)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_struct_def_post(&mut self,
&LateContext<'a, 'tcx>,
&'tcx VariantData,
Symbol,
&'tcx Generics,
NodeId)
&LateContext<'a, 'tcx>,
&'tcx VariantData,
Symbol,
&'tcx Generics,
NodeId)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_struct_field(&mut self, &LateContext<'a, 'tcx>, &'tcx StructField)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_variant(&mut self,
&LateContext<'a, 'tcx>,
&'tcx Spanned<Variant_>,
&'tcx Generics)
&LateContext<'a, 'tcx>,
&'tcx Spanned<Variant_>,
&'tcx Generics)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn check_variant_post(&mut self,
&LateContext<'a, 'tcx>,
&'tcx Spanned<Variant_>,
&'tcx Generics)
&LateContext<'a, 'tcx>,
&'tcx Spanned<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)
🔬 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