rustc_lint

Trait 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 DanglingPointers

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 IfLetRescope

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 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 StaticMutRefs

Source§

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

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 UnqualifiedLocalImports

Source§

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

Source§

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

Source§

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