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_closure_types(&self) -> bool { ... }
fn has_erasable_regions(&self) -> bool { ... }
fn is_global(&self) -> bool { ... }
}Unstable (
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
Unstable (
rustc_private)fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool
Unstable (
rustc_private)Provided Methods
fn fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(&self, folder: &mut F) -> Self
Unstable (
rustc_private)fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool
Unstable (
rustc_private)fn has_regions_escaping_depth(&self, depth: u32) -> bool
Unstable (
rustc_private)fn has_escaping_regions(&self) -> bool
Unstable (
rustc_private)fn has_type_flags(&self, flags: TypeFlags) -> bool
Unstable (
rustc_private)fn has_projection_types(&self) -> bool
Unstable (
rustc_private)fn references_error(&self) -> bool
Unstable (
rustc_private)fn has_param_types(&self) -> bool
Unstable (
rustc_private)fn has_self_ty(&self) -> bool
Unstable (
rustc_private)fn has_infer_types(&self) -> bool
Unstable (
rustc_private)fn needs_infer(&self) -> bool
Unstable (
rustc_private)fn needs_subst(&self) -> bool
Unstable (
rustc_private)fn has_closure_types(&self) -> bool
Unstable (
rustc_private)fn has_erasable_regions(&self) -> bool
Unstable (
rustc_private)fn is_global(&self) -> bool
Unstable (
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 LvalueTy<'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 ()impl<'tcx> TypeFoldable<'tcx> for Unsafetyimpl<'tcx> TypeFoldable<'tcx> for Abiimpl<'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, T: TypeFoldable<'tcx>> TypeFoldable<'tcx> for P<[T]>impl<'tcx, T: TypeFoldable<'tcx>> TypeFoldable<'tcx> for VecPerParamSpace<T>impl<'tcx> TypeFoldable<'tcx> for TraitTy<'tcx>impl<'tcx> TypeFoldable<'tcx> for &'tcx [Ty<'tcx>]impl<'tcx> TypeFoldable<'tcx> for Ty<'tcx>impl<'tcx> TypeFoldable<'tcx> for &'tcx BareFnTy<'tcx>impl<'tcx> TypeFoldable<'tcx> for ClosureTy<'tcx>impl<'tcx> TypeFoldable<'tcx> for TypeAndMut<'tcx>impl<'tcx> TypeFoldable<'tcx> for FnOutput<'tcx>impl<'tcx> TypeFoldable<'tcx> for FnSig<'tcx>impl<'tcx> TypeFoldable<'tcx> for TraitRef<'tcx>impl<'tcx> TypeFoldable<'tcx> for ImplHeader<'tcx>impl<'tcx> TypeFoldable<'tcx> for Regionimpl<'tcx> TypeFoldable<'tcx> for &'tcx Regionimpl<'tcx> TypeFoldable<'tcx> for &'tcx Substs<'tcx>impl<'tcx> TypeFoldable<'tcx> for ClosureSubsts<'tcx>impl<'tcx> TypeFoldable<'tcx> for ItemSubsts<'tcx>impl<'tcx> TypeFoldable<'tcx> for AutoRef<'tcx>impl<'tcx> TypeFoldable<'tcx> for BuiltinBoundsimpl<'tcx> TypeFoldable<'tcx> for ExistentialBounds<'tcx>impl<'tcx> TypeFoldable<'tcx> for TypeParameterDef<'tcx>impl<'tcx> TypeFoldable<'tcx> for ObjectLifetimeDefaultimpl<'tcx> TypeFoldable<'tcx> for RegionParameterDefimpl<'tcx> TypeFoldable<'tcx> for Generics<'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 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> TypeFoldable<'tcx> for ParameterEnvironment<'tcx>impl<'tcx> TypeFoldable<'tcx> for TypeScheme<'tcx>