Trait rustc_lint::LateLintPass
source · pub trait LateLintPass<'tcx>: LintPass {
Show 31 methods
// Provided methods
fn check_body(&mut self, _: &LateContext<'tcx>, _: &Body<'tcx>) { ... }
fn check_body_post(&mut self, _: &LateContext<'tcx>, _: &Body<'tcx>) { ... }
fn check_crate(&mut self, _: &LateContext<'tcx>) { ... }
fn check_crate_post(&mut self, _: &LateContext<'tcx>) { ... }
fn check_mod(&mut self, _: &LateContext<'tcx>, _: &'tcx Mod<'tcx>, _: HirId) { ... }
fn check_foreign_item(
&mut self,
_: &LateContext<'tcx>,
_: &'tcx ForeignItem<'tcx>,
) { ... }
fn check_item(&mut self, _: &LateContext<'tcx>, _: &'tcx Item<'tcx>) { ... }
fn check_item_post(&mut self, _: &LateContext<'tcx>, _: &'tcx Item<'tcx>) { ... }
fn check_local(&mut self, _: &LateContext<'tcx>, _: &'tcx LetStmt<'tcx>) { ... }
fn check_block(&mut self, _: &LateContext<'tcx>, _: &'tcx Block<'tcx>) { ... }
fn check_block_post(&mut self, _: &LateContext<'tcx>, _: &'tcx Block<'tcx>) { ... }
fn check_stmt(&mut self, _: &LateContext<'tcx>, _: &'tcx Stmt<'tcx>) { ... }
fn check_arm(&mut self, _: &LateContext<'tcx>, _: &'tcx Arm<'tcx>) { ... }
fn check_pat(&mut self, _: &LateContext<'tcx>, _: &'tcx Pat<'tcx>) { ... }
fn check_expr(&mut self, _: &LateContext<'tcx>, _: &'tcx Expr<'tcx>) { ... }
fn check_expr_post(&mut self, _: &LateContext<'tcx>, _: &'tcx Expr<'tcx>) { ... }
fn check_ty(&mut self, _: &LateContext<'tcx>, _: &'tcx Ty<'tcx>) { ... }
fn check_generic_param(
&mut self,
_: &LateContext<'tcx>,
_: &'tcx GenericParam<'tcx>,
) { ... }
fn check_generics(&mut self, _: &LateContext<'tcx>, _: &'tcx Generics<'tcx>) { ... }
fn check_poly_trait_ref(
&mut self,
_: &LateContext<'tcx>,
_: &'tcx PolyTraitRef<'tcx>,
) { ... }
fn check_fn(
&mut self,
_: &LateContext<'tcx>,
_: FnKind<'tcx>,
_: &'tcx FnDecl<'tcx>,
_: &'tcx Body<'tcx>,
_: Span,
_: LocalDefId,
) { ... }
fn check_trait_item(
&mut self,
_: &LateContext<'tcx>,
_: &'tcx TraitItem<'tcx>,
) { ... }
fn check_impl_item(
&mut self,
_: &LateContext<'tcx>,
_: &'tcx ImplItem<'tcx>,
) { ... }
fn check_impl_item_post(
&mut self,
_: &LateContext<'tcx>,
_: &'tcx ImplItem<'tcx>,
) { ... }
fn check_struct_def(
&mut self,
_: &LateContext<'tcx>,
_: &'tcx VariantData<'tcx>,
) { ... }
fn check_field_def(
&mut self,
_: &LateContext<'tcx>,
_: &'tcx FieldDef<'tcx>,
) { ... }
fn check_variant(&mut self, _: &LateContext<'tcx>, _: &'tcx Variant<'tcx>) { ... }
fn check_path(&mut self, _: &LateContext<'tcx>, _: &Path<'tcx>, _: HirId) { ... }
fn check_attribute(&mut self, _: &LateContext<'tcx>, _: &'tcx Attribute) { ... }
fn check_attributes(&mut self, _: &LateContext<'tcx>, _: &'tcx [Attribute]) { ... }
fn check_attributes_post(
&mut self,
_: &LateContext<'tcx>,
_: &'tcx [Attribute],
) { ... }
}
Provided Methods§
fn check_body(&mut self, _: &LateContext<'tcx>, _: &Body<'tcx>)
fn check_body_post(&mut self, _: &LateContext<'tcx>, _: &Body<'tcx>)
fn check_crate(&mut self, _: &LateContext<'tcx>)
fn check_crate_post(&mut self, _: &LateContext<'tcx>)
fn check_mod(&mut self, _: &LateContext<'tcx>, _: &'tcx Mod<'tcx>, _: HirId)
fn check_foreign_item( &mut self, _: &LateContext<'tcx>, _: &'tcx ForeignItem<'tcx>, )
fn check_item(&mut self, _: &LateContext<'tcx>, _: &'tcx Item<'tcx>)
fn check_item_post(&mut self, _: &LateContext<'tcx>, _: &'tcx Item<'tcx>)
fn check_local(&mut self, _: &LateContext<'tcx>, _: &'tcx LetStmt<'tcx>)
fn check_block(&mut self, _: &LateContext<'tcx>, _: &'tcx Block<'tcx>)
fn check_block_post(&mut self, _: &LateContext<'tcx>, _: &'tcx Block<'tcx>)
fn check_stmt(&mut self, _: &LateContext<'tcx>, _: &'tcx Stmt<'tcx>)
fn check_arm(&mut self, _: &LateContext<'tcx>, _: &'tcx Arm<'tcx>)
fn check_pat(&mut self, _: &LateContext<'tcx>, _: &'tcx Pat<'tcx>)
fn check_expr(&mut self, _: &LateContext<'tcx>, _: &'tcx Expr<'tcx>)
fn check_expr_post(&mut self, _: &LateContext<'tcx>, _: &'tcx Expr<'tcx>)
fn check_ty(&mut self, _: &LateContext<'tcx>, _: &'tcx Ty<'tcx>)
fn check_generic_param( &mut self, _: &LateContext<'tcx>, _: &'tcx GenericParam<'tcx>, )
fn check_generics(&mut self, _: &LateContext<'tcx>, _: &'tcx Generics<'tcx>)
fn check_poly_trait_ref( &mut self, _: &LateContext<'tcx>, _: &'tcx PolyTraitRef<'tcx>, )
fn check_fn( &mut self, _: &LateContext<'tcx>, _: FnKind<'tcx>, _: &'tcx FnDecl<'tcx>, _: &'tcx Body<'tcx>, _: Span, _: LocalDefId, )
fn check_trait_item(&mut self, _: &LateContext<'tcx>, _: &'tcx TraitItem<'tcx>)
fn check_impl_item(&mut self, _: &LateContext<'tcx>, _: &'tcx ImplItem<'tcx>)
fn check_impl_item_post( &mut self, _: &LateContext<'tcx>, _: &'tcx ImplItem<'tcx>, )
fn check_struct_def( &mut self, _: &LateContext<'tcx>, _: &'tcx VariantData<'tcx>, )
fn check_field_def(&mut self, _: &LateContext<'tcx>, _: &'tcx FieldDef<'tcx>)
fn check_variant(&mut self, _: &LateContext<'tcx>, _: &'tcx Variant<'tcx>)
fn check_path(&mut self, _: &LateContext<'tcx>, _: &Path<'tcx>, _: HirId)
fn check_attribute(&mut self, _: &LateContext<'tcx>, _: &'tcx Attribute)
fn check_attributes(&mut self, _: &LateContext<'tcx>, _: &'tcx [Attribute])
fn check_attributes_post(&mut self, _: &LateContext<'tcx>, _: &'tcx [Attribute])
Implementors§
impl LateLintPass<'_> for HardwiredLints
impl LateLintPass<'_> for BadOptAccess
impl LateLintPass<'_> for DefaultHashTypes
impl LateLintPass<'_> for Diagnostics
impl LateLintPass<'_> for QueryStability
impl<'tcx> LateLintPass<'tcx> for AsyncClosureUsage
impl<'tcx> LateLintPass<'tcx> for AsyncFnInTrait
impl<'tcx> LateLintPass<'tcx> for AsmLabels
impl<'tcx> LateLintPass<'tcx> for DerefNullPtr
impl<'tcx> LateLintPass<'tcx> for ExplicitOutlivesRequirements
impl<'tcx> LateLintPass<'tcx> for InvalidNoMangleItems
impl<'tcx> LateLintPass<'tcx> for InvalidValue
impl<'tcx> LateLintPass<'tcx> for MissingCopyImplementations
impl<'tcx> LateLintPass<'tcx> for MissingDebugImplementations
impl<'tcx> LateLintPass<'tcx> for MissingDoc
impl<'tcx> LateLintPass<'tcx> for MutableTransmutes
impl<'tcx> LateLintPass<'tcx> for NonShorthandFieldPatterns
impl<'tcx> LateLintPass<'tcx> for TrivialConstraints
impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds
impl<'tcx> LateLintPass<'tcx> for UngatedAsyncFnTrackCaller
impl<'tcx> LateLintPass<'tcx> for UnreachablePub
impl<'tcx> LateLintPass<'tcx> for UnstableFeatures
impl<'tcx> LateLintPass<'tcx> for DerefIntoDynSupertrait
impl<'tcx> LateLintPass<'tcx> for DropForgetUseless
impl<'tcx> LateLintPass<'tcx> for EnumIntrinsicsNonEnums
impl<'tcx> LateLintPass<'tcx> for ForLoopsOverFallibles
impl<'tcx> LateLintPass<'tcx> for ImplTraitOvercaptures
impl<'tcx> LateLintPass<'tcx> for ExistingDocKeyword
impl<'tcx> LateLintPass<'tcx> for SpanUseEqCtxt
impl<'tcx> LateLintPass<'tcx> for TyTyKind
impl<'tcx> LateLintPass<'tcx> for TypeIr
impl<'tcx> LateLintPass<'tcx> for InvalidFromUtf8
impl<'tcx> LateLintPass<'tcx> for RuntimeCombinedLateLintPass<'_, 'tcx>
impl<'tcx> LateLintPass<'tcx> for LetUnderscore
impl<'tcx> LateLintPass<'tcx> for MapUnitFn
impl<'tcx> LateLintPass<'tcx> for TemporaryCStringAsPtr
impl<'tcx> LateLintPass<'tcx> for MultipleSupertraitUpcastable
impl<'tcx> LateLintPass<'tcx> for NonPanicFmt
impl<'tcx> LateLintPass<'tcx> for NonLocalDefinitions
impl<'tcx> LateLintPass<'tcx> for NonSnakeCase
impl<'tcx> LateLintPass<'tcx> for NonUpperCaseGlobals
impl<'tcx> LateLintPass<'tcx> for NoopMethodCall
impl<'tcx> LateLintPass<'tcx> for OpaqueHiddenInferredBound
impl<'tcx> LateLintPass<'tcx> for PassByValue
impl<'tcx> LateLintPass<'tcx> for PtrNullChecks
impl<'tcx> LateLintPass<'tcx> for InvalidReferenceCasting
impl<'tcx> LateLintPass<'tcx> for ShadowedIntoIter
impl<'tcx> LateLintPass<'tcx> for BuiltinCombinedModuleLateLintPass
impl<'tcx> LateLintPass<'tcx> for TailExprDropOrder
impl<'tcx> LateLintPass<'tcx> for DropTraitConstraints
impl<'tcx> LateLintPass<'tcx> for ImproperCTypesDeclarations
impl<'tcx> LateLintPass<'tcx> for ImproperCTypesDefinitions
ImproperCTypesDefinitions
checks items outside of foreign items (e.g. stuff that isn’t in
extern "C" { }
blocks):
extern "<abi>" fn
definitions are checked in the same way as theImproperCtypesDeclarations
visitor checks functions if<abi>
is external (e.g. “C”).- All other items which contain types (e.g. other functions, struct definitions, etc) are checked for extern fn-ptrs with external ABIs.