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

source§

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

source§

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

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for 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, _: &mut F ) -> Result<Self, F::Error>

source§

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

source§

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

source§

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

source§

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

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for 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 Arc<T>
where I: Interner, T: TypeFoldable<I>,

source§

fn try_fold_with<F>( self, folder: &mut F ) -> Result<Arc<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<Clause<'tcx>>

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

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 Mapping

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 Coverage

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for TraitRef<'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 LateParamRegion

source§

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

source§

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

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for CoroutineWitness<'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 OpaqueTypeKey<'tcx>

source§

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

source§

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

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Placeholder<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 AliasTy<'tcx>

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for GenSig<'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, A, B> TypeFoldable<TyCtxt<'tcx>> for OutlivesPredicate<A, B>
where A: TypeFoldable<TyCtxt<'tcx>>, B: TypeFoldable<TyCtxt<'tcx>>,

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

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 CanonicalVarKind<I>
where I: Interner, <I as Interner>::Ty: TypeFoldable<I>,

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 CanonicalVarInfo<I>
where I: Interner, <I as Interner>::Ty: TypeFoldable<I>,

source§

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

source§

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

source§

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

source§

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