## TypeFoldable

# Trait TypeFoldable

    pub trait TypeFoldable<I>: TypeVisitable<I> + Clonewhere
        I: Interner,{
        // Required methods
        fn try_fold_with<F>(
            self,
            folder: &mut F,
        ) -> Result<Self, <F as FallibleTypeFolder<I>>::Error>
           where F: FallibleTypeFolder<I>;
        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§

#### 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 `FallibleTypeFolder`.

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

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

For most types, this just traverses the value, calling `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::fold_ty`). This is where control transfers from `TypeFoldable` to `TypeFolder`.

Same as `TypeFoldable::try_fold_with`, but not fallible. Make sure to keep the behavior in sync across functions.

## Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

## Implementations on Foreign Types§

§

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

§

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

§

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

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CoroutineKind

§

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

§

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

§

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

§

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

§

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

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for RangeEnd

§

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

§

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

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<PlaceBase, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> PlaceBase
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<ProjectionKind, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> ProjectionKind
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<Const<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> Const<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<LocalInfo<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> LocalInfo<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for MentionedItem<'tcx>

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<MentionedItem<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> MentionedItem<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<VarDebugInfoContents<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> VarDebugInfoContents<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for AnnotationSource

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<AnnotationSource, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> AnnotationSource
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<ConstraintCategory<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> ConstraintCategory<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<ReturnConstraint, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> ReturnConstraint
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for StmtDebugInfo<'tcx>

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<StmtDebugInfo<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> StmtDebugInfo<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<AggregateKind<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> AggregateKind<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for BackwardIncompatibleDropReason

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<BackwardIncompatibleDropReason, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> BackwardIncompatibleDropReason
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<BinOp, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> BinOp
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<CallSource, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> CallSource
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

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

§

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

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for InlineAsmMacro

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<InlineAsmMacro, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> InlineAsmMacro
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<InlineAsmOperand<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> InlineAsmOperand<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<NonDivergingIntrinsic<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> NonDivergingIntrinsic<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<Operand<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> Operand<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for RawPtrKind

§

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

§

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

§

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

§

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

§

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

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<Rvalue<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> Rvalue<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<StatementKind<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> StatementKind<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<TerminatorKind<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> TerminatorKind<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<UnOp, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> UnOp
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<UnwindAction, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> UnwindAction
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<UnwindTerminateReason, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> UnwindTerminateReason
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<CastKind, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> CastKind
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<Adjust, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> Adjust
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<AutoBorrow, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> AutoBorrow
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for PatAdjust

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<PatAdjust, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> PatAdjust
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<BorrowKind, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> BorrowKind
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<UpvarCapture, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> UpvarCapture
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ExprKind

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<ExprKind, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> ExprKind
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<Asyncness, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> Asyncness
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for InstanceKind<'tcx>

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<InstanceKind<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> InstanceKind<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ReifyReason

§

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

§

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

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for UpvarArgs<'tcx>

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<UpvarArgs<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> UpvarArgs<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for UserTypeKind<'tcx>

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<UserTypeKind<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> UserTypeKind<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<Place<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> Place<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<Projection<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> Projection<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<BasicBlocks<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> BasicBlocks<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<UnevaluatedConst<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> UnevaluatedConst<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<GlobalId<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> GlobalId<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CoroutineLayout<'tcx>

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<CoroutineLayout<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> CoroutineLayout<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CoroutineSavedLocal

§

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

§

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

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CoroutineSavedTy<'tcx>

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<CoroutineSavedTy<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> CoroutineSavedTy<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<PlaceTy<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> PlaceTy<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<Statement<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> Statement<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for StmtDebugInfos<'tcx>

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<StmtDebugInfos<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> StmtDebugInfos<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<BasicBlockData<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> BasicBlockData<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<Body<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> Body<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CoroutineInfo<'tcx>

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<CoroutineInfo<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> CoroutineInfo<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<LocalDecl<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> LocalDecl<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<MirSource<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> MirSource<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<SourceScopeData<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> SourceScopeData<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<UserTypeProjection, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> UserTypeProjection
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<UserTypeProjections, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> UserTypeProjections
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<VarDebugInfo<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> VarDebugInfo<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<VarDebugInfoFragment<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> VarDebugInfoFragment<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<ConstOperand<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> ConstOperand<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<CopyNonOverlapping<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> CopyNonOverlapping<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<Place<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> Place<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<Terminator<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> Terminator<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<Adjustment<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> Adjustment<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<OverloadedDeref, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> OverloadedDeref
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for PatAdjustment<'tcx>

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<PatAdjustment<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> PatAdjustment<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<CaptureInfo, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> CaptureInfo
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<CapturedPlace<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> CapturedPlace<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<UpvarId, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> UpvarId
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<UpvarPath, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> UpvarPath
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<Expr<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> Expr<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<F>( self, folder: &mut F, ) -> Result<Const<'tcx>, <F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<F>(self, folder: &mut F) -> Const<'tcx>
where F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Value<'tcx>

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<Value<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> Value<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<F>( self, folder: &mut F, ) -> Result<GenericArg<'tcx>, <F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<F>(self, folder: &mut F) -> GenericArg<'tcx>
where F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<UserArgs<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> UserArgs<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<UserSelfTy<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> UserSelfTy<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<Instance<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> Instance<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Pattern<'tcx>

§

#### fn try_fold_with<F>( self, folder: &mut F, ) -> Result<Pattern<'tcx>, <F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<F>(self, folder: &mut F) -> Pattern<'tcx>
where F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<F>( self, folder: &mut F, ) -> Result<Clause<'tcx>, <F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<F>(self, folder: &mut F) -> Clause<'tcx>
where F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<F>( self, folder: &mut F, ) -> Result<Predicate<'tcx>, <F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<F>(self, folder: &mut F) -> Predicate<'tcx>
where F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<TraitPredPrintModifiersAndPath<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>( self, __folder: &mut __F, ) -> TraitPredPrintModifiersAndPath<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for TraitPredPrintWithBoundConstness<'tcx>

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<TraitPredPrintWithBoundConstness<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>( self, __folder: &mut __F, ) -> TraitPredPrintWithBoundConstness<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<TraitRefPrintOnlyTraitName<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> TraitRefPrintOnlyTraitName<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<TraitRefPrintOnlyTraitPath<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> TraitRefPrintOnlyTraitPath<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for TraitRefPrintSugared<'tcx>

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<TraitRefPrintSugared<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> TraitRefPrintSugared<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

#### fn try_fold_with<F>( self, folder: &mut F, ) -> Result<Region<'tcx>, <F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<F>(self, folder: &mut F) -> Region<'tcx>
where F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<ClosureSizeProfileData<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> ClosureSizeProfileData<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<InstantiatedPredicates<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> InstantiatedPredicates<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<ParamEnv<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> ParamEnv<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ProvisionalHiddenType<'tcx>

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<ProvisionalHiddenType<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> ProvisionalHiddenType<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<F>( self, folder: &mut F, ) -> Result<Term<'tcx>, <F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<F>(self, folder: &mut F) -> Term<'tcx>
where F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<F>( self, folder: &mut F, ) -> Result<Ty<'tcx>, <F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<F>(self, folder: &mut F) -> Ty<'tcx>
where F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for TypingEnv<'tcx>

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<TypingEnv<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> TypingEnv<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<CanonicalUserTypeAnnotation<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> CanonicalUserTypeAnnotation<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<UserType<'tcx>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> UserType<'tcx>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

#### fn fold_with<F>(self, _folder: &mut F) -> ErrorGuaranteed
where F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<AssertKind<O>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> AssertKind<O>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<ClearCrossCrate<T>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> ClearCrossCrate<T>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<ParamEnvAnd<'tcx, T>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> ParamEnvAnd<'tcx, T>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<PseudoCanonicalInput<'tcx, T>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> PseudoCanonicalInput<'tcx, T>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<'tcx, T> TypeFoldable<TyCtxt<'tcx>> for Spanned<T>
where T: TypeFoldable<TyCtxt<'tcx>> + Debug + Clone,

§

#### fn try_fold_with<F>( self, folder: &mut F, ) -> Result<Spanned<T>, <F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<F>(self, folder: &mut F) -> Spanned<T>
where F: TypeFolder<TyCtxt<'tcx>>,

§

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

§

#### fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<ProjectionElem<V, T>, <__F as FallibleTypeFolder<TyCtxt<'tcx>>>::Error>
where __F: FallibleTypeFolder<TyCtxt<'tcx>>,

§

#### fn fold_with<__F>(self, __folder: &mut __F) -> ProjectionElem<V, T>
where __F: TypeFolder<TyCtxt<'tcx>>,

§

### impl<I> TypeFoldable<I> for bool
where I: Interner,

§

#### fn try_fold_with<F>( self, _: &mut F, ) -> Result<bool, <F as FallibleTypeFolder<I>>::Error>
where F: FallibleTypeFolder<I>,

§

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

§

### impl<I> TypeFoldable<I> for u16
where I: Interner,

§

#### fn try_fold_with<F>( self, _: &mut F, ) -> Result<u16, <F as FallibleTypeFolder<I>>::Error>
where F: FallibleTypeFolder<I>,

§

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

§

### impl<I> TypeFoldable<I> for u32
where I: Interner,

§

#### fn try_fold_with<F>( self, _: &mut F, ) -> Result<u32, <F as FallibleTypeFolder<I>>::Error>
where F: FallibleTypeFolder<I>,

§

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

§

### impl<I> TypeFoldable<I> for u64
where I: Interner,

§

#### fn try_fold_with<F>( self, _: &mut F, ) -> Result<u64, <F as FallibleTypeFolder<I>>::Error>
where F: FallibleTypeFolder<I>,

§

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

§

### impl<I> TypeFoldable<I> for ()
where I: Interner,

§

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

§

#### fn fold_with<F>(self, _: &mut F)
where F: TypeFolder<I>,

§

### impl<I> TypeFoldable<I> for usize
where I: Interner,

§

#### fn try_fold_with<F>( self, _: &mut F, ) -> Result<usize, <F as FallibleTypeFolder<I>>::Error>
where F: FallibleTypeFolder<I>,

§

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

§

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

§

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

§

#### fn fold_with<F>(self, folder: &mut F) -> (A, B, C)
where F: TypeFolder<I>,

§

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

§

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

§

#### fn fold_with<F>(self, folder: &mut F) -> Option<T>
where F: TypeFolder<I>,

§

### impl<I, T> TypeFoldable<I> for Box<[T]>
where I: Interner, T: TypeFoldable<I>,

§

#### fn try_fold_with<F>( self, folder: &mut F, ) -> Result<Box<[T]>, <F as FallibleTypeFolder<I>>::Error>
where F: FallibleTypeFolder<I>,

§

#### fn fold_with<F>(self, folder: &mut F) -> Box<[T]>
where F: TypeFolder<I>,

§

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

§

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

§

#### fn fold_with<F>(self, folder: &mut F) -> Box<T>
where F: TypeFolder<I>,

§

### impl<I, T> TypeFoldable<I> for Arc<T>
where I: Interner, T: TypeFoldable<I>,

§

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

§

#### fn fold_with<F>(self, folder: &mut F) -> Arc<T>
where F: TypeFolder<I>,

§

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

§

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

§

#### fn fold_with<F>(self, folder: &mut F) -> Vec<T>
where F: TypeFolder<I>,

§

### impl<I, T> TypeFoldable<I> for ThinVec<T>
where I: Interner, T: TypeFoldable<I>,

§

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

§

#### fn fold_with<F>(self, folder: &mut F) -> ThinVec<T>
where F: TypeFolder<I>,

§

### impl<I, T, E> TypeFoldable<I> for Result<T, E>
where I: Interner, T: TypeFoldable<I>, E: TypeFoldable<I>,

§

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

§

#### fn fold_with<F>(self, folder: &mut F) -> Result<T, E>
where F: TypeFolder<I>,

§

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

§

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

§

#### fn fold_with<F>(self, folder: &mut F) -> IndexVec<Ix, T>
where F: TypeFolder<I>,

§

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

§

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

§

#### fn fold_with<F>(self, folder: &mut F) -> (T, U)
where F: TypeFolder<I>,

## Implementors§

§

### impl<I, T> !TypeFoldable<I> for EarlyBinder<I, T>
where I: Interner,

Available on crate feature `nightly` only.

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

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for IsConstable

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

Source§

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

§

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

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for MethodAutoderefSteps<'tcx>

§

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

§

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

§

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

§

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

§

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

§

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

§

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

Source§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for AutoImplConstituents<'tcx>

§

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

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for DerivedCause<'tcx>

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for DerivedHostCause<'tcx>

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ImplDerivedCause<'tcx>

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ImplDerivedHostCause<'tcx>

§

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

§

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

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ObligationCauseCodeHandle<'tcx>

§

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for PatternOriginExpr

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

### impl<I> TypeFoldable<I> for AliasBoundKind
where I: Interner,

§

### impl<I> TypeFoldable<I> for BuiltinImplSource
where I: Interner,

§

### impl<I> TypeFoldable<I> for rustc_trait_selection::solve::Certainty
where I: Interner,

§

### impl<I> TypeFoldable<I> for GoalSource
where I: Interner,

§

### impl<I> TypeFoldable<I> for ProbeKind<I>
where I: Interner, Result<Canonical<I, Response<I>>, NoSolution>: TypeFoldable<I>, CandidateSource<I>: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for IsFirstInputType
where I: Interner,

§

### impl<I> TypeFoldable<I> for AliasRelationDirection
where I: Interner,

§

### impl<I> TypeFoldable<I> for BoundConstness
where I: Interner,

§

### impl<I> TypeFoldable<I> for BoundVarIndexKind
where I: Interner,

§

### impl<I> TypeFoldable<I> for ClauseKind<I>
where I: Interner, TraitPredicate<I>: TypeFoldable<I>, OutlivesPredicate<I, <I as Interner>::Region>: TypeFoldable<I>, OutlivesPredicate<I, <I as Interner>::Ty>: TypeFoldable<I>, ProjectionPredicate<I>: TypeFoldable<I>, <I as Interner>::Const: TypeFoldable<I>, <I as Interner>::Ty: TypeFoldable<I>, <I as Interner>::Term: TypeFoldable<I>, HostEffectPredicate<I>: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for ExistentialPredicate<I>
where I: Interner, ExistentialTraitRef<I>: TypeFoldable<I>, ExistentialProjection<I>: TypeFoldable<I>, <I as Interner>::TraitId: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for Mutability
where I: Interner,

§

### impl<I> TypeFoldable<I> for PatternKind<I>
where I: Interner, <I as Interner>::Const: TypeFoldable<I>, <I as Interner>::PatList: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for PredicateKind<I>
where I: Interner, ClauseKind<I>: TypeFoldable<I>, <I as Interner>::TraitId: TypeFoldable<I>, SubtypePredicate<I>: TypeFoldable<I>, CoercePredicate<I>: TypeFoldable<I>, <I as Interner>::Const: TypeFoldable<I>, NormalizesTo<I>: TypeFoldable<I>, <I as Interner>::Term: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for PredicatePolarity
where I: Interner,

§

### impl<I> TypeFoldable<I> for Variance
where I: Interner,

§

### impl<I> TypeFoldable<I> for ExternalConstraintsData<I>
where I: Interner, Vec<OutlivesPredicate<I, <I as Interner>::GenericArg>>: TypeFoldable<I>, Vec<(OpaqueTypeKey<I>, <I as Interner>::Ty)>: TypeFoldable<I>, NestedNormalizationGoals<I>: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for NestedNormalizationGoals<I>
where I: Interner, Vec<(GoalSource, Goal<I, <I as Interner>::Predicate>)>: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for Response<I>
where I: Interner, CanonicalVarValues<I>: TypeFoldable<I>, <I as Interner>::ExternalConstraints: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for AliasTerm<I>
where I: Interner, <I as Interner>::GenericArgs: TypeFoldable<I>, <I as Interner>::DefId: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for AliasTy<I>
where I: Interner, <I as Interner>::GenericArgs: TypeFoldable<I>, <I as Interner>::DefId: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for CanonicalVarValues<I>
where I: Interner, <I as Interner>::GenericArgs: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for ClosureArgs<I>
where I: Interner, <I as Interner>::GenericArgs: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for CoercePredicate<I>
where I: Interner, <I as Interner>::Ty: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for CoroutineArgs<I>
where I: Interner, <I as Interner>::GenericArgs: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for CoroutineClosureArgs<I>
where I: Interner, <I as Interner>::GenericArgs: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for CoroutineClosureSignature<I>
where I: Interner, <I as Interner>::Ty: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for CoroutineWitnessTypes<I>
where I: Interner, <I as Interner>::Tys: TypeFoldable<I>, <I as Interner>::RegionAssumptions: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for DebruijnIndex
where I: Interner,

§

### impl<I> TypeFoldable<I> for ExistentialProjection<I>
where I: Interner, <I as Interner>::DefId: TypeFoldable<I>, <I as Interner>::GenericArgs: TypeFoldable<I>, <I as Interner>::Term: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for ExistentialTraitRef<I>
where I: Interner, <I as Interner>::TraitId: TypeFoldable<I>, <I as Interner>::GenericArgs: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for FnHeader<I>
where I: Interner, <I as Interner>::Safety: TypeFoldable<I>, <I as Interner>::Abi: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for FnSig<I>
where I: Interner, <I as Interner>::Tys: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for FnSigTys<I>
where I: Interner, <I as Interner>::Tys: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for GenSig<I>
where I: Interner, <I as Interner>::Ty: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for HostEffectPredicate<I>
where I: Interner, TraitRef<I>: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for NormalizesTo<I>
where I: Interner, AliasTerm<I>: TypeFoldable<I>, <I as Interner>::Term: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for OpaqueTypeKey<I>
where I: Interner, <I as Interner>::LocalDefId: TypeFoldable<I>, <I as Interner>::GenericArgs: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for ProjectionPredicate<I>
where I: Interner, AliasTerm<I>: TypeFoldable<I>, <I as Interner>::Term: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for SubtypePredicate<I>
where I: Interner, <I as Interner>::Ty: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for TraitPredicate<I>
where I: Interner, TraitRef<I>: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for TraitRef<I>
where I: Interner, <I as Interner>::TraitId: TypeFoldable<I>, <I as Interner>::GenericArgs: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for TypeAndMut<I>
where I: Interner, <I as Interner>::Ty: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for rustc_trait_selection::infer::canonical::ir::UnevaluatedConst<I>
where I: Interner, <I as Interner>::UnevaluatedConstId: TypeFoldable<I>, <I as Interner>::GenericArgs: TypeFoldable<I>,

§

### impl<I> TypeFoldable<I> for UniverseIndex
where I: Interner,

§

### impl<I> TypeFoldable<I> for UnsafeBinderInner<I>
where I: Interner, Binder<I, <I as Interner>::Ty>: TypeFoldable<I>,

§

### impl<I, A> TypeFoldable<I> for OutlivesPredicate<I, A>
where I: Interner, A: TypeFoldable<I>, <I as Interner>::Region: TypeFoldable<I>,

§

### impl<I, P> TypeFoldable<I> for Goal<I, P>
where I: Interner, <I as Interner>::ParamEnv: TypeFoldable<I>, P: TypeFoldable<I>,

§

### impl<I, P> TypeFoldable<I> for QueryInput<I, P>
where I: Interner, Goal<I, P>: TypeFoldable<I>, <I as Interner>::PredefinedOpaques: TypeFoldable<I>,

§

### impl<I, T> TypeFoldable<I> for State<I, T>
where I: Interner, CanonicalVarValues<I>: TypeFoldable<I>, T: TypeFoldable<I>,

§

### impl<I, T> TypeFoldable<I> for Binder<I, T>
where I: Interner, T: TypeFoldable<I>,

§

### impl<I, T> TypeFoldable<I> for Placeholder<I, T>
where I: Interner, T: TypeFoldable<I>,

§

### impl<T, I> TypeFoldable<I> for ExpectedFound<T>
where I: Interner, T: TypeFoldable<I>,