Trait rustc_middle::ty::TypeFoldable

source ·
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) -> Self
where 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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

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 &'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 ByRef

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

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 Safety

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

source§

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

source§

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

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 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 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 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, T: TypeFoldable<TyCtxt<'tcx>> + Debug + Clone> TypeFoldable<TyCtxt<'tcx>> for Spanned<T>

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

Implementors§

source§

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

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for &'tcx List<Const<'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 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 CovTerm

source§

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

source§

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

source§

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

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 MentionedItem<'tcx>

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

source§

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

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::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 rustc_middle::ty::closure::BorrowKind

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for UpvarArgs<'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 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 BlockMarkerId

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CoroutineSavedTy<'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 CoroutineInfo<'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 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 PredefinedOpaques<'tcx>

source§

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

source§

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

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ImplDerivedCause<'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 Expr<'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 Pattern<'tcx>

source§

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

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Predicate<'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 TraitRefPrintSugared<'tcx>

source§

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

source§

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

source§

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

source§

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

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ClosureSizeProfileData<'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 ParamEnv<'tcx>

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

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> TypeFoldable<TyCtxt<'tcx>> for Clauses<'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, R> TypeFoldable<TyCtxt<'tcx>> for QueryResponse<'tcx, R>
where R: TypeFoldable<TyCtxt<'tcx>>,

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 ParamEnvAnd<'tcx, T>
where T: TypeFoldable<TyCtxt<'tcx>>,

source§

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

source§

impl<I> TypeFoldable<I> for ExistentialPredicate<I>

source§

impl<I> TypeFoldable<I> for ClauseKind<I>

source§

impl<I> TypeFoldable<I> for PredicateKind<I>

source§

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

source§

impl<I> TypeFoldable<I> for AliasTyKind
where I: Interner,

source§

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

source§

impl<I> TypeFoldable<I> for CanonicalTyVarKind
where I: Interner,

source§

impl<I> TypeFoldable<I> for CanonicalVarKind<I>

source§

impl<I> TypeFoldable<I> for FloatTy
where I: Interner,

source§

impl<I> TypeFoldable<I> for InferTy
where I: Interner,

source§

impl<I> TypeFoldable<I> for IntVarValue
where I: Interner,

source§

impl<I> TypeFoldable<I> for Movability
where I: Interner,

source§

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

source§

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

source§

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

source§

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

source§

impl<I> TypeFoldable<I> for rustc_middle::ty::solve::Certainty
where I: Interner,

source§

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

source§

impl<I> TypeFoldable<I> for MaybeCause
where I: Interner,

source§

impl<I> TypeFoldable<I> for ProbeKind<I>

source§

impl<I> TypeFoldable<I> for rustc_type_ir::const_kind::UnevaluatedConst<I>

source§

impl<I> TypeFoldable<I> for OpaqueTypeKey<I>

source§

impl<I> TypeFoldable<I> for AliasTerm<I>

source§

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

source§

impl<I> TypeFoldable<I> for ExistentialProjection<I>

source§

impl<I> TypeFoldable<I> for ExistentialTraitRef<I>

source§

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

source§

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

source§

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

source§

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

source§

impl<I> TypeFoldable<I> for TraitRef<I>

source§

impl<I> TypeFoldable<I> for AliasTy<I>

source§

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

source§

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

source§

impl<I> TypeFoldable<I> for ExternalConstraintsData<I>

source§

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

source§

impl<I> TypeFoldable<I> for NoSolution
where I: Interner,

source§

impl<I> TypeFoldable<I> for PredefinedOpaquesData<I>
where I: Interner, Vec<(OpaqueTypeKey<I>, <I as Interner>::Ty)>: TypeFoldable<I>,

source§

impl<I> TypeFoldable<I> for Response<I>

source§

impl<I> TypeFoldable<I> for CanonicalVarInfo<I>

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<I> TypeFoldable<I> for RegionVid
where I: Interner,

source§

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

source§

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

source§

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

source§

impl<I, P> TypeFoldable<I> for QueryInput<I, P>

source§

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

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

source§

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

source§

impl<I, T> TypeFoldable<I> for Rc<T>
where I: Interner, T: TypeFoldable<I>,

source§

impl<I, T> TypeFoldable<I> for State<I, T>

source§

impl<I, V> TypeFoldable<I> for Canonical<I, V>

source§

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