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

    // Provided method
    fn fold_with<F: TypeFolder<I>>(self, folder: &mut F) -> Self { ... }
}
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: FallibleTypeFolder<I>>( self, folder: &mut F ) -> Result<Self, F::Error>

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: TypeFolder<I>>(self, folder: &mut F) -> Self

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<I: Interner, T: TypeFoldable<I>, E: TypeFoldable<I>> TypeFoldable<I> for Result<T, E>

source§

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

source§

impl<I: Interner> TypeFoldable<I> for bool

source§

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

source§

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

source§

impl<I: Interner, T: TypeFoldable<I>> TypeFoldable<I> for Lrc<T>

source§

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

source§

impl<I: Interner> TypeFoldable<I> for ()

source§

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

source§

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

source§

impl<I: Interner, T: TypeFoldable<I>> TypeFoldable<I> for Vec<T>

source§

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

source§

impl<I: Interner> TypeFoldable<I> for usize

source§

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

source§

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

source§

impl<I: Interner, T: TypeFoldable<I>, U: TypeFoldable<I>> TypeFoldable<I> for (T, U)

source§

impl<I: Interner> TypeFoldable<I> for String

source§

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

source§

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

source§

impl<I: Interner> TypeFoldable<I> for u64

source§

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

source§

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

source§

impl<I: Interner, T: TypeFoldable<I>> TypeFoldable<I> for Option<T>

source§

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

source§

impl<I: Interner, T: TypeFoldable<I>> TypeFoldable<I> for Box<T>

source§

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

source§

impl<I: Interner, T: TypeFoldable<I>, Ix: Idx> TypeFoldable<I> for IndexVec<Ix, T>

source§

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

source§

impl<I: Interner> TypeFoldable<I> for u16

source§

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

source§

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

source§

impl<I: Interner> TypeFoldable<I> for u32

source§

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

source§

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

source§

impl<I: Interner, A: TypeFoldable<I>, B: TypeFoldable<I>, C: TypeFoldable<I>> TypeFoldable<I> for (A, B, C)

Implementors§

source§

impl<I: Interner> TypeFoldable<I> for DebruijnIndex

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

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

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

impl<'tcx, O: TypeFoldable<TyCtxt<'tcx>>> TypeFoldable<TyCtxt<'tcx>> for Obligation<'tcx, O>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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