pub trait TypeFoldable<I>: TypeVisitable<I>where
    I: Interner,{
    // Required method
    fn try_fold_with<F>(
        self,
        folder: &mut F
    ) -> Result<Self, <F as FallibleTypeFolder<I>>::Error>
       where F: FallibleTypeFolder<I>;

    // Provided method
    fn fold_with<F>(self, folder: &mut F) -> Self
       where F: TypeFolder<I> { ... }
}
Expand description

This trait is implemented for every type that can be folded, providing the skeleton of the traversal.

To implement this conveniently, use the derive macro located in rustc_macros.

This trait is a sub-trait of TypeVisitable. This is because many TypeFolder instances use the methods in TypeVisitableExt while folding, which means in practice almost every foldable type needs to also be visitable. (However, there are some types that are visitable without being foldable.)

Required Methods§

source

fn try_fold_with<F>( self, folder: &mut F ) -> Result<Self, <F as FallibleTypeFolder<I>>::Error>where F: FallibleTypeFolder<I>,

The entry point for folding. To fold a value t with a folder f call: t.try_fold_with(f).

For most types, this just traverses the value, calling try_fold_with on each field/element.

For types of interest (such as Ty), the implementation of this method calls a folder method specifically for that type (such as F::try_fold_ty). This is where control transfers from TypeFoldable to TypeFolder.

Provided Methods§

source

fn fold_with<F>(self, folder: &mut F) -> Selfwhere F: TypeFolder<I>,

A convenient alternative to try_fold_with for use with infallible folders. Do not override this method, to ensure coherence with try_fold_with.

Implementations on Foreign Types§

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for LocalDefId

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ErrorGuaranteed

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for &'tcx [Span]

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _folder: &mut F ) -> Result<Self, F::Error>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for FieldIdx

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Symbol

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Size

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for MatchSource

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Res

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for DefId

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for &'tcx [InlineAsmTemplatePiece]

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _folder: &mut F ) -> Result<Self, F::Error>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for InlineAsmTemplatePiece

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for GeneratorKind

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Movability

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Abi

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for InlineAsmOptions

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Unsafety

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for NodeId

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for VariantIdx

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for HirId

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for InlineAsmRegOrRegClass

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Ident

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Span

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

Implementors§

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for &'tcx List<Const<'tcx>>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for &'tcx List<Clause<'tcx>>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for &'tcx List<Ty<'tcx>>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for &'tcx List<PlaceElem<'tcx>>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for &'tcx List<PolyExistentialPredicate<'tcx>>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for PlaceBase

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ProjectionKind

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CanonicalTyVarKind

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CanonicalVarKind<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for rustc_middle::infer::canonical::Certainty

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for rustc_middle::mir::consts::Const<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ConstValue<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CoverageKind

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Op

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for rustc_middle::mir::coverage::Operand

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for BindingForm<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for LocalInfo<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Mutability

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for VarDebugInfoContents<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ErrorHandled

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Scalar

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ConstraintCategory<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ReturnConstraint

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for AggregateKind<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for BinOp

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for rustc_middle::mir::syntax::BorrowKind

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CallSource

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for rustc_middle::mir::syntax::CastKind

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for FakeReadCause

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for InlineAsmOperand<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for MirPhase

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for NonDivergingIntrinsic<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for NullOp<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for rustc_middle::mir::syntax::Operand<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for RetagKind

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Rvalue<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for StatementKind<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for TerminatorKind<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for UnOp

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for UnwindAction

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for UnwindTerminateReason

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for BuiltinImplSource

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for DefiningAnchor

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ObligationCauseCode<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Reveal

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for WellFormedLoc

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for OutlivesBound<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for OverflowError

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for rustc_middle::traits::solve::Certainty

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for MaybeCause

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for rustc_middle::ty::abstract_const::CastKind

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for NotConstEvaluatable

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Adjust<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for AutoBorrow<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for AutoBorrowMutability

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for PointerCoercion

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for AdtKind

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for AssocKind

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for BindingMode

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for rustc_middle::ty::closure::BorrowKind

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ClosureKind

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for UpvarCapture

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Expr<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for InferConst<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ValTree<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for AliasKind

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for AliasRelationDirection

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Asyncness

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for BoundConstness

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ClauseKind<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for FloatTy

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ImplPolarity

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ImplSubject<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for InferTy

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for IntVarValue

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for PredicateKind<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for TermKind<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Variance

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for InstanceDef<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for BoundRegionKind

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ExistentialPredicate<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for UserType<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for rustc_middle::hir::place::Place<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Projection<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CanonicalVarInfo<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CanonicalVarValues<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for QueryRegionConstraints<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for MemberConstraint<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Scope

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for BasicBlocks<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Cache

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for rustc_middle::mir::consts::UnevaluatedConst<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CodeRegion

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CounterId

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ExpressionId

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for AllocId

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for GlobalId<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for GeneratorLayout<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for GeneratorSavedLocal

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for GeneratorSavedTy<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Statement<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for BasicBlock

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for BasicBlockData<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for BlockTailInfo

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Body<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for GeneratorInfo<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Local

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for LocalDecl<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for MirSource<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Promoted

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for SourceInfo

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for SourceScope

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for SourceScopeData<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for SourceScopeLocalData

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for UserTypeProjection

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for UserTypeProjections

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for VarDebugInfo<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for VarDebugInfoFragment<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ConstOperand<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CopyNonOverlapping<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Coverage

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for rustc_middle::mir::syntax::Place<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for SwitchTargets

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for PlaceTy<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Terminator<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for DropckOutlivesResult<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for NormalizationResult<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for AscribeUserType<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Eq<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ProvePredicate<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Subtype<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ExternalConstraints<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ExternalConstraintsData<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for PredefinedOpaques<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Response<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for DerivedObligationCause<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for IfExpressionCause<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ImplDerivedObligationCause<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for InternedObligationCauseCode<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for MatchExpressionArmCause<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ObligationCause<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for UnifyReceiverContext<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Adjustment<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for OverloadedDeref<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for AssocItem

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CaptureInfo

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CapturedPlace<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for UpvarId

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for UpvarPath

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for rustc_middle::ty::consts::kind::UnevaluatedConst<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for rustc_middle::ty::consts::Const<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for GenericArg<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for UserArgs<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for UserSelfTy<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Instance<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for TraitPredPrintModifiersAndPath<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for TraitRefPrintOnlyTraitName<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for TraitRefPrintOnlyTraitPath<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for GeneratorWitness<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Clause<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ClosureSizeProfileData<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CoercePredicate<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ImplHeader<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for InstantiatedPredicates<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for OpaqueHiddenType<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for OpaqueTypeKey<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ParamEnv<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Placeholder<BoundRegion>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Placeholder<BoundTy>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Placeholder<BoundVar>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Predicate<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ProjectionPredicate<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for SubtypePredicate<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Term<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for TraitPredicate<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Ty<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for UniverseIndex

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for AliasTy<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for BoundVar

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ClosureArgs<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ExistentialProjection<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ExistentialTraitRef<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for FnSig<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for FreeRegion

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for GenSig<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for GeneratorArgs<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ParamConst

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ParamTy

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Region<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for RegionVid

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for TraitRef<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for TypeAndMut<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CanonicalUserTypeAnnotation<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for UserTypeAnnotationIndex

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CanonicalVarInfos<'tcx>

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for GenericArgsRef<'tcx>

source§

impl<'tcx, A, B> TypeFoldable<TyCtxt<'tcx>> for OutlivesPredicate<A, B>where A: TypeFoldable<TyCtxt<'tcx>>, B: TypeFoldable<TyCtxt<'tcx>>,

source§

impl<'tcx, N> TypeFoldable<TyCtxt<'tcx>> for ImplSource<'tcx, N>where N: TypeFoldable<TyCtxt<'tcx>>,

source§

impl<'tcx, N> TypeFoldable<TyCtxt<'tcx>> for ImplSourceUserDefinedData<'tcx, N>where N: TypeFoldable<TyCtxt<'tcx>>,

source§

impl<'tcx, O> TypeFoldable<TyCtxt<'tcx>> for AssertKind<O>where O: TypeFoldable<TyCtxt<'tcx>>,

source§

impl<'tcx, P> TypeFoldable<TyCtxt<'tcx>> for Goal<'tcx, P>where P: TypeFoldable<TyCtxt<'tcx>>,

source§

impl<'tcx, R> TypeFoldable<TyCtxt<'tcx>> for QueryResponse<'tcx, R>where R: TypeFoldable<TyCtxt<'tcx>>,

source§

impl<'tcx, T> !TypeFoldable<TyCtxt<'tcx>> for EarlyBinder<T>

For early binders, you should first call instantiate before using any visitors.

source§

impl<'tcx, T> TypeFoldable<TyCtxt<'tcx>> for ClearCrossCrate<T>where T: TypeFoldable<TyCtxt<'tcx>>,

source§

impl<'tcx, T> TypeFoldable<TyCtxt<'tcx>> for Normalize<T>where T: TypeFoldable<TyCtxt<'tcx>>,

source§

impl<'tcx, T> TypeFoldable<TyCtxt<'tcx>> for State<'tcx, T>where T: TypeFoldable<TyCtxt<'tcx>>,

source§

impl<'tcx, T> TypeFoldable<TyCtxt<'tcx>> for QueryInput<'tcx, T>where T: TypeFoldable<TyCtxt<'tcx>>,

source§

impl<'tcx, T> TypeFoldable<TyCtxt<'tcx>> for ExpectedFound<T>where T: TypeFoldable<TyCtxt<'tcx>>,

source§

impl<'tcx, T> TypeFoldable<TyCtxt<'tcx>> for ParamEnvAnd<'tcx, T>where T: TypeFoldable<TyCtxt<'tcx>>,

source§

impl<'tcx, T: TypeFoldable<TyCtxt<'tcx>>> TypeFoldable<TyCtxt<'tcx>> for Binder<'tcx, T>

source§

impl<'tcx, V> TypeFoldable<TyCtxt<'tcx>> for Canonical<'tcx, V>where V: TypeFoldable<TyCtxt<'tcx>>,

source§

impl<'tcx, V, T> TypeFoldable<TyCtxt<'tcx>> for ProjectionElem<V, T>where T: TypeFoldable<TyCtxt<'tcx>>, V: TypeFoldable<TyCtxt<'tcx>>,