Trait rustc::ty::fold::TypeFoldable
[−]
[src]
pub trait TypeFoldable<'tcx>: Debug + Clone { fn super_fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(&self,
folder: &mut F)
-> Self; fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool; fn fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(&self,
folder: &mut F)
-> Self { ... } fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool { ... } fn has_regions_escaping_depth(&self, depth: u32) -> bool { ... } fn has_escaping_regions(&self) -> bool { ... } fn has_type_flags(&self, flags: TypeFlags) -> bool { ... } fn has_projection_types(&self) -> bool { ... } fn references_error(&self) -> bool { ... } fn has_param_types(&self) -> bool { ... } fn has_self_ty(&self) -> bool { ... } fn has_infer_types(&self) -> bool { ... } fn needs_infer(&self) -> bool { ... } fn needs_subst(&self) -> bool { ... } fn has_re_skol(&self) -> bool { ... } fn has_closure_types(&self) -> bool { ... } fn has_erasable_regions(&self) -> bool { ... } fn is_normalized_for_trans(&self) -> bool { ... } fn is_global(&self) -> bool { ... } }
🔬 This is a nightly-only experimental API. (
rustc_private
)The TypeFoldable trait is implemented for every type that can be folded. Basically, every type that has a corresponding method in TypeFolder.
Required Methods
fn super_fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(&self,
folder: &mut F)
-> Self
folder: &mut F)
-> Self
🔬 This is a nightly-only experimental API. (
rustc_private
)fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)Provided Methods
fn fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(&self,
folder: &mut F)
-> Self
folder: &mut F)
-> Self
🔬 This is a nightly-only experimental API. (
rustc_private
)fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)fn has_regions_escaping_depth(&self, depth: u32) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)fn has_escaping_regions(&self) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)fn has_type_flags(&self, flags: TypeFlags) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)fn has_projection_types(&self) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)fn references_error(&self) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)fn has_param_types(&self) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)fn has_self_ty(&self) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)fn has_infer_types(&self) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)fn needs_infer(&self) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)fn needs_subst(&self) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)fn has_re_skol(&self) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)fn has_closure_types(&self) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)fn has_erasable_regions(&self) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)fn is_normalized_for_trans(&self) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)fn is_global(&self) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)Indicates whether this value references only 'global' types/lifetimes that are the same regardless of what fn we are in. This is used for caching. Errs on the side of returning false.
Implementors
impl<'tcx> TypeFoldable<'tcx> for ValuePairs<'tcx>
impl<'tcx> TypeFoldable<'tcx> for TypeTrace<'tcx>
impl<'tcx> TypeFoldable<'tcx> for LvalueTy<'tcx>
impl<'tcx> TypeFoldable<'tcx> for Mir<'tcx>
impl<'tcx> TypeFoldable<'tcx> for LocalDecl<'tcx>
impl<'tcx> TypeFoldable<'tcx> for BasicBlockData<'tcx>
impl<'tcx> TypeFoldable<'tcx> for Statement<'tcx>
impl<'tcx> TypeFoldable<'tcx> for Terminator<'tcx>
impl<'tcx> TypeFoldable<'tcx> for Lvalue<'tcx>
impl<'tcx> TypeFoldable<'tcx> for Rvalue<'tcx>
impl<'tcx> TypeFoldable<'tcx> for Operand<'tcx>
impl<'tcx, B, V> TypeFoldable<'tcx> for Projection<'tcx, B, V> where B: TypeFoldable<'tcx>,
V: TypeFoldable<'tcx>impl<'tcx> TypeFoldable<'tcx> for Constant<'tcx>
impl<'tcx> TypeFoldable<'tcx> for Literal<'tcx>
impl<'tcx, O: TypeFoldable<'tcx>> TypeFoldable<'tcx> for Obligation<'tcx, O>
impl<'tcx, N: TypeFoldable<'tcx>> TypeFoldable<'tcx> for VtableImplData<'tcx, N>
impl<'tcx, N: TypeFoldable<'tcx>> TypeFoldable<'tcx> for VtableClosureData<'tcx, N>
impl<'tcx, N: TypeFoldable<'tcx>> TypeFoldable<'tcx> for VtableDefaultImplData<N>
impl<'tcx, N: TypeFoldable<'tcx>> TypeFoldable<'tcx> for VtableBuiltinData<N>
impl<'tcx, N: TypeFoldable<'tcx>> TypeFoldable<'tcx> for VtableObjectData<'tcx, N>
impl<'tcx, N: TypeFoldable<'tcx>> TypeFoldable<'tcx> for VtableFnPointerData<'tcx, N>
impl<'tcx, N: TypeFoldable<'tcx>> TypeFoldable<'tcx> for Vtable<'tcx, N>
impl<'tcx, T: TypeFoldable<'tcx>> TypeFoldable<'tcx> for Normalized<'tcx, T>
impl<'tcx> TypeFoldable<'tcx> for ObligationCauseCode<'tcx>
impl<'tcx> TypeFoldable<'tcx> for DerivedObligationCause<'tcx>
impl<'tcx> TypeFoldable<'tcx> for ObligationCause<'tcx>
impl<'tcx> TypeFoldable<'tcx> for Kind<'tcx>
impl<'tcx> TypeFoldable<'tcx> for &'tcx Substs<'tcx>
impl<'tcx> TypeFoldable<'tcx> for ()
impl<'tcx> TypeFoldable<'tcx> for Unsafety
impl<'tcx> TypeFoldable<'tcx> for Abi
impl<'tcx, T: TypeFoldable<'tcx>, U: TypeFoldable<'tcx>> TypeFoldable<'tcx> for (T, U)
impl<'tcx, T: TypeFoldable<'tcx>> TypeFoldable<'tcx> for Option<T>
impl<'tcx, T: TypeFoldable<'tcx>> TypeFoldable<'tcx> for Rc<T>
impl<'tcx, T: TypeFoldable<'tcx>> TypeFoldable<'tcx> for Box<T>
impl<'tcx, T: TypeFoldable<'tcx>> TypeFoldable<'tcx> for Vec<T>
impl<'tcx, T: TypeFoldable<'tcx>> TypeFoldable<'tcx> for Binder<T>
impl<'tcx> TypeFoldable<'tcx> for &'tcx Slice<ExistentialPredicate<'tcx>>
impl<'tcx> TypeFoldable<'tcx> for ExistentialPredicate<'tcx>
impl<'tcx> TypeFoldable<'tcx> for &'tcx Slice<Ty<'tcx>>
impl<'tcx> TypeFoldable<'tcx> for Ty<'tcx>
impl<'tcx> TypeFoldable<'tcx> for TypeAndMut<'tcx>
impl<'tcx> TypeFoldable<'tcx> for FnSig<'tcx>
impl<'tcx> TypeFoldable<'tcx> for TraitRef<'tcx>
impl<'tcx> TypeFoldable<'tcx> for ExistentialTraitRef<'tcx>
impl<'tcx> TypeFoldable<'tcx> for ImplHeader<'tcx>
impl<'tcx> TypeFoldable<'tcx> for &'tcx Region
impl<'tcx> TypeFoldable<'tcx> for ClosureSubsts<'tcx>
impl<'tcx> TypeFoldable<'tcx> for ItemSubsts<'tcx>
impl<'tcx> TypeFoldable<'tcx> for AutoBorrow<'tcx>
impl<'tcx> TypeFoldable<'tcx> for GenericPredicates<'tcx>
impl<'tcx> TypeFoldable<'tcx> for Predicate<'tcx>
impl<'tcx> TypeFoldable<'tcx> for ProjectionPredicate<'tcx>
impl<'tcx> TypeFoldable<'tcx> for ExistentialProjection<'tcx>
impl<'tcx> TypeFoldable<'tcx> for ProjectionTy<'tcx>
impl<'tcx> TypeFoldable<'tcx> for InstantiatedPredicates<'tcx>
impl<'tcx> TypeFoldable<'tcx> for EquatePredicate<'tcx>
impl<'tcx> TypeFoldable<'tcx> for TraitPredicate<'tcx>
impl<'tcx, T, U> TypeFoldable<'tcx> for OutlivesPredicate<T, U> where T: TypeFoldable<'tcx>,
U: TypeFoldable<'tcx>impl<'tcx> TypeFoldable<'tcx> for ClosureUpvar<'tcx>
impl<'tcx, T: TypeFoldable<'tcx>> TypeFoldable<'tcx> for ExpectedFound<T>
impl<'tcx, T: TypeFoldable<'tcx>, I: Idx> TypeFoldable<'tcx> for IndexVec<I, T>