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§

source

fn check_body(&mut self, _: &LateContext<'tcx>, _: &Body<'tcx>)

source

fn check_body_post(&mut self, _: &LateContext<'tcx>, _: &Body<'tcx>)

source

fn check_crate(&mut self, _: &LateContext<'tcx>)

source

fn check_crate_post(&mut self, _: &LateContext<'tcx>)

source

fn check_mod(&mut self, _: &LateContext<'tcx>, _: &'tcx Mod<'tcx>, _: HirId)

source

fn check_foreign_item( &mut self, _: &LateContext<'tcx>, _: &'tcx ForeignItem<'tcx>, )

source

fn check_item(&mut self, _: &LateContext<'tcx>, _: &'tcx Item<'tcx>)

source

fn check_item_post(&mut self, _: &LateContext<'tcx>, _: &'tcx Item<'tcx>)

source

fn check_local(&mut self, _: &LateContext<'tcx>, _: &'tcx LetStmt<'tcx>)

source

fn check_block(&mut self, _: &LateContext<'tcx>, _: &'tcx Block<'tcx>)

source

fn check_block_post(&mut self, _: &LateContext<'tcx>, _: &'tcx Block<'tcx>)

source

fn check_stmt(&mut self, _: &LateContext<'tcx>, _: &'tcx Stmt<'tcx>)

source

fn check_arm(&mut self, _: &LateContext<'tcx>, _: &'tcx Arm<'tcx>)

source

fn check_pat(&mut self, _: &LateContext<'tcx>, _: &'tcx Pat<'tcx>)

source

fn check_expr(&mut self, _: &LateContext<'tcx>, _: &'tcx Expr<'tcx>)

source

fn check_expr_post(&mut self, _: &LateContext<'tcx>, _: &'tcx Expr<'tcx>)

source

fn check_ty(&mut self, _: &LateContext<'tcx>, _: &'tcx Ty<'tcx>)

source

fn check_generic_param( &mut self, _: &LateContext<'tcx>, _: &'tcx GenericParam<'tcx>, )

source

fn check_generics(&mut self, _: &LateContext<'tcx>, _: &'tcx Generics<'tcx>)

source

fn check_poly_trait_ref( &mut self, _: &LateContext<'tcx>, _: &'tcx PolyTraitRef<'tcx>, )

source

fn check_fn( &mut self, _: &LateContext<'tcx>, _: FnKind<'tcx>, _: &'tcx FnDecl<'tcx>, _: &'tcx Body<'tcx>, _: Span, _: LocalDefId, )

source

fn check_trait_item(&mut self, _: &LateContext<'tcx>, _: &'tcx TraitItem<'tcx>)

source

fn check_impl_item(&mut self, _: &LateContext<'tcx>, _: &'tcx ImplItem<'tcx>)

source

fn check_impl_item_post( &mut self, _: &LateContext<'tcx>, _: &'tcx ImplItem<'tcx>, )

source

fn check_struct_def( &mut self, _: &LateContext<'tcx>, _: &'tcx VariantData<'tcx>, )

source

fn check_field_def(&mut self, _: &LateContext<'tcx>, _: &'tcx FieldDef<'tcx>)

source

fn check_variant(&mut self, _: &LateContext<'tcx>, _: &'tcx Variant<'tcx>)

source

fn check_path(&mut self, _: &LateContext<'tcx>, _: &Path<'tcx>, _: HirId)

source

fn check_attribute(&mut self, _: &LateContext<'tcx>, _: &'tcx Attribute)

source

fn check_attributes(&mut self, _: &LateContext<'tcx>, _: &'tcx [Attribute])

source

fn check_attributes_post(&mut self, _: &LateContext<'tcx>, _: &'tcx [Attribute])

Implementors§

source§

impl LateLintPass<'_> for HardwiredLints

source§

impl LateLintPass<'_> for BadOptAccess

source§

impl LateLintPass<'_> for DefaultHashTypes

source§

impl LateLintPass<'_> for Diagnostics

source§

impl LateLintPass<'_> for QueryStability

source§

impl<'tcx> LateLintPass<'tcx> for AsyncClosureUsage

source§

impl<'tcx> LateLintPass<'tcx> for AsyncFnInTrait

source§

impl<'tcx> LateLintPass<'tcx> for AsmLabels

source§

impl<'tcx> LateLintPass<'tcx> for DerefNullPtr

source§

impl<'tcx> LateLintPass<'tcx> for ExplicitOutlivesRequirements

source§

impl<'tcx> LateLintPass<'tcx> for InvalidNoMangleItems

source§

impl<'tcx> LateLintPass<'tcx> for InvalidValue

source§

impl<'tcx> LateLintPass<'tcx> for MissingCopyImplementations

source§

impl<'tcx> LateLintPass<'tcx> for MissingDebugImplementations

source§

impl<'tcx> LateLintPass<'tcx> for MissingDoc

source§

impl<'tcx> LateLintPass<'tcx> for MutableTransmutes

source§

impl<'tcx> LateLintPass<'tcx> for NonShorthandFieldPatterns

source§

impl<'tcx> LateLintPass<'tcx> for TrivialConstraints

source§

impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds

source§

impl<'tcx> LateLintPass<'tcx> for UngatedAsyncFnTrackCaller

source§

impl<'tcx> LateLintPass<'tcx> for UnreachablePub

source§

impl<'tcx> LateLintPass<'tcx> for UnstableFeatures

source§

impl<'tcx> LateLintPass<'tcx> for DerefIntoDynSupertrait

source§

impl<'tcx> LateLintPass<'tcx> for DropForgetUseless

source§

impl<'tcx> LateLintPass<'tcx> for EnumIntrinsicsNonEnums

source§

impl<'tcx> LateLintPass<'tcx> for ForLoopsOverFallibles

source§

impl<'tcx> LateLintPass<'tcx> for ImplTraitOvercaptures

source§

impl<'tcx> LateLintPass<'tcx> for ExistingDocKeyword

source§

impl<'tcx> LateLintPass<'tcx> for SpanUseEqCtxt

source§

impl<'tcx> LateLintPass<'tcx> for TyTyKind

source§

impl<'tcx> LateLintPass<'tcx> for TypeIr

source§

impl<'tcx> LateLintPass<'tcx> for InvalidFromUtf8

source§

impl<'tcx> LateLintPass<'tcx> for RuntimeCombinedLateLintPass<'_, 'tcx>

source§

impl<'tcx> LateLintPass<'tcx> for LetUnderscore

source§

impl<'tcx> LateLintPass<'tcx> for MapUnitFn

source§

impl<'tcx> LateLintPass<'tcx> for TemporaryCStringAsPtr

source§

impl<'tcx> LateLintPass<'tcx> for MultipleSupertraitUpcastable

source§

impl<'tcx> LateLintPass<'tcx> for NonPanicFmt

source§

impl<'tcx> LateLintPass<'tcx> for NonLocalDefinitions

source§

impl<'tcx> LateLintPass<'tcx> for NonSnakeCase

source§

impl<'tcx> LateLintPass<'tcx> for NonUpperCaseGlobals

source§

impl<'tcx> LateLintPass<'tcx> for NoopMethodCall

source§

impl<'tcx> LateLintPass<'tcx> for OpaqueHiddenInferredBound

source§

impl<'tcx> LateLintPass<'tcx> for PassByValue

source§

impl<'tcx> LateLintPass<'tcx> for PtrNullChecks

source§

impl<'tcx> LateLintPass<'tcx> for InvalidReferenceCasting

source§

impl<'tcx> LateLintPass<'tcx> for ShadowedIntoIter

source§

impl<'tcx> LateLintPass<'tcx> for BuiltinCombinedModuleLateLintPass

source§

impl<'tcx> LateLintPass<'tcx> for TailExprDropOrder

source§

impl<'tcx> LateLintPass<'tcx> for DropTraitConstraints

source§

impl<'tcx> LateLintPass<'tcx> for ImproperCTypesDeclarations

source§

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 the ImproperCtypesDeclarations 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.
source§

impl<'tcx> LateLintPass<'tcx> for InvalidAtomicOrdering

source§

impl<'tcx> LateLintPass<'tcx> for TypeLimits

source§

impl<'tcx> LateLintPass<'tcx> for VariantSizeDifferences

source§

impl<'tcx> LateLintPass<'tcx> for UnitBindings

source§

impl<'tcx> LateLintPass<'tcx> for PathStatements

source§

impl<'tcx> LateLintPass<'tcx> for UnusedAllocation

source§

impl<'tcx> LateLintPass<'tcx> for UnusedResults