Trait rustc_infer::infer::canonical::ir::inherent::Ty

source ·
pub trait Ty<I>: Copy + Debug + Hash + Eq + Into<<I as Interner>::GenericArg> + Into<<I as Interner>::Term> + IntoKind<Kind = TyKind<I>> + TypeSuperVisitable<I> + TypeSuperFoldable<I> + Relate<I> + Flags
where I: Interner<Ty = Self>,
{
Show 27 methods // Required methods fn new_bool(interner: I) -> Self; fn new_infer(interner: I, var: InferTy) -> Self; fn new_var(interner: I, var: TyVid) -> Self; fn new_bound( interner: I, debruijn: DebruijnIndex, var: <I as Interner>::BoundTy, ) -> Self; fn new_anon_bound( interner: I, debruijn: DebruijnIndex, var: BoundVar, ) -> Self; fn new_alias(interner: I, kind: AliasTyKind, alias_ty: AliasTy<I>) -> Self; fn new_error(interner: I, guar: <I as Interner>::ErrorGuaranteed) -> Self; fn new_adt( interner: I, adt_def: <I as Interner>::AdtDef, args: <I as Interner>::GenericArgs, ) -> Self; fn new_foreign(interner: I, def_id: <I as Interner>::DefId) -> Self; fn new_dynamic( interner: I, preds: <I as Interner>::BoundExistentialPredicates, region: <I as Interner>::Region, kind: DynKind, ) -> Self; fn new_coroutine( interner: I, def_id: <I as Interner>::DefId, args: <I as Interner>::GenericArgs, ) -> Self; fn new_coroutine_closure( interner: I, def_id: <I as Interner>::DefId, args: <I as Interner>::GenericArgs, ) -> Self; fn new_closure( interner: I, def_id: <I as Interner>::DefId, args: <I as Interner>::GenericArgs, ) -> Self; fn new_coroutine_witness( interner: I, def_id: <I as Interner>::DefId, args: <I as Interner>::GenericArgs, ) -> Self; fn new_ptr(interner: I, ty: Self, mutbl: Mutability) -> Self; fn new_ref( interner: I, region: <I as Interner>::Region, ty: Self, mutbl: Mutability, ) -> Self; fn new_array_with_const_len( interner: I, ty: Self, len: <I as Interner>::Const, ) -> Self; fn new_slice(interner: I, ty: Self) -> Self; fn new_tup(interner: I, tys: &[Self]) -> Self; fn new_tup_from_iter<It, T>( interner: I, iter: It, ) -> <T as CollectAndApply<Self, Self>>::Output where It: Iterator<Item = T>, T: CollectAndApply<Self, Self>; fn tuple_fields(self) -> <I as Interner>::Tys; fn to_opt_closure_kind(self) -> Option<ClosureKind>; fn from_closure_kind(interner: I, kind: ClosureKind) -> Self; fn from_coroutine_closure_kind(interner: I, kind: ClosureKind) -> Self; fn new_fn_def( interner: I, def_id: <I as Interner>::DefId, args: <I as Interner>::GenericArgs, ) -> Self; fn new_fn_ptr(interner: I, sig: Binder<I, FnSig<I>>) -> Self; fn new_pat(interner: I, ty: Self, pat: <I as Interner>::Pat) -> Self;
}

Required Methods§

source

fn new_bool(interner: I) -> Self

source

fn new_infer(interner: I, var: InferTy) -> Self

source

fn new_var(interner: I, var: TyVid) -> Self

source

fn new_bound( interner: I, debruijn: DebruijnIndex, var: <I as Interner>::BoundTy, ) -> Self

source

fn new_anon_bound(interner: I, debruijn: DebruijnIndex, var: BoundVar) -> Self

source

fn new_alias(interner: I, kind: AliasTyKind, alias_ty: AliasTy<I>) -> Self

source

fn new_error(interner: I, guar: <I as Interner>::ErrorGuaranteed) -> Self

source

fn new_adt( interner: I, adt_def: <I as Interner>::AdtDef, args: <I as Interner>::GenericArgs, ) -> Self

source

fn new_foreign(interner: I, def_id: <I as Interner>::DefId) -> Self

source

fn new_dynamic( interner: I, preds: <I as Interner>::BoundExistentialPredicates, region: <I as Interner>::Region, kind: DynKind, ) -> Self

source

fn new_coroutine( interner: I, def_id: <I as Interner>::DefId, args: <I as Interner>::GenericArgs, ) -> Self

source

fn new_coroutine_closure( interner: I, def_id: <I as Interner>::DefId, args: <I as Interner>::GenericArgs, ) -> Self

source

fn new_closure( interner: I, def_id: <I as Interner>::DefId, args: <I as Interner>::GenericArgs, ) -> Self

source

fn new_coroutine_witness( interner: I, def_id: <I as Interner>::DefId, args: <I as Interner>::GenericArgs, ) -> Self

source

fn new_ptr(interner: I, ty: Self, mutbl: Mutability) -> Self

source

fn new_ref( interner: I, region: <I as Interner>::Region, ty: Self, mutbl: Mutability, ) -> Self

source

fn new_array_with_const_len( interner: I, ty: Self, len: <I as Interner>::Const, ) -> Self

source

fn new_slice(interner: I, ty: Self) -> Self

source

fn new_tup(interner: I, tys: &[Self]) -> Self

source

fn new_tup_from_iter<It, T>( interner: I, iter: It, ) -> <T as CollectAndApply<Self, Self>>::Output
where It: Iterator<Item = T>, T: CollectAndApply<Self, Self>,

source

fn tuple_fields(self) -> <I as Interner>::Tys

source

fn to_opt_closure_kind(self) -> Option<ClosureKind>

source

fn from_closure_kind(interner: I, kind: ClosureKind) -> Self

source

fn from_coroutine_closure_kind(interner: I, kind: ClosureKind) -> Self

source

fn new_fn_def( interner: I, def_id: <I as Interner>::DefId, args: <I as Interner>::GenericArgs, ) -> Self

source

fn new_fn_ptr(interner: I, sig: Binder<I, FnSig<I>>) -> Self

source

fn new_pat(interner: I, ty: Self, pat: <I as Interner>::Pat) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

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

source§

fn new_bool(tcx: TyCtxt<'tcx>) -> Ty<'tcx>

source§

fn new_infer(tcx: TyCtxt<'tcx>, infer: InferTy) -> Ty<'tcx>

source§

fn new_var(tcx: TyCtxt<'tcx>, vid: TyVid) -> Ty<'tcx>

source§

fn new_bound( interner: TyCtxt<'tcx>, debruijn: DebruijnIndex, var: BoundTy, ) -> Ty<'tcx>

source§

fn new_anon_bound( tcx: TyCtxt<'tcx>, debruijn: DebruijnIndex, var: BoundVar, ) -> Ty<'tcx>

source§

fn new_alias( interner: TyCtxt<'tcx>, kind: AliasTyKind, alias_ty: AliasTy<TyCtxt<'tcx>>, ) -> Ty<'tcx>

source§

fn new_error(interner: TyCtxt<'tcx>, guar: ErrorGuaranteed) -> Ty<'tcx>

source§

fn new_adt( interner: TyCtxt<'tcx>, adt_def: AdtDef<'tcx>, args: &'tcx RawList<(), GenericArg<'tcx>>, ) -> Ty<'tcx>

source§

fn new_foreign(interner: TyCtxt<'tcx>, def_id: DefId) -> Ty<'tcx>

source§

fn new_dynamic( interner: TyCtxt<'tcx>, preds: &'tcx RawList<(), Binder<TyCtxt<'tcx>, ExistentialPredicate<TyCtxt<'tcx>>>>, region: Region<'tcx>, kind: DynKind, ) -> Ty<'tcx>

source§

fn new_coroutine( interner: TyCtxt<'tcx>, def_id: DefId, args: &'tcx RawList<(), GenericArg<'tcx>>, ) -> Ty<'tcx>

source§

fn new_coroutine_closure( interner: TyCtxt<'tcx>, def_id: DefId, args: &'tcx RawList<(), GenericArg<'tcx>>, ) -> Ty<'tcx>

source§

fn new_closure( interner: TyCtxt<'tcx>, def_id: DefId, args: &'tcx RawList<(), GenericArg<'tcx>>, ) -> Ty<'tcx>

source§

fn new_coroutine_witness( interner: TyCtxt<'tcx>, def_id: DefId, args: &'tcx RawList<(), GenericArg<'tcx>>, ) -> Ty<'tcx>

source§

fn new_ptr(interner: TyCtxt<'tcx>, ty: Ty<'tcx>, mutbl: Mutability) -> Ty<'tcx>

source§

fn new_ref( interner: TyCtxt<'tcx>, region: Region<'tcx>, ty: Ty<'tcx>, mutbl: Mutability, ) -> Ty<'tcx>

source§

fn new_array_with_const_len( interner: TyCtxt<'tcx>, ty: Ty<'tcx>, len: Const<'tcx>, ) -> Ty<'tcx>

source§

fn new_slice(interner: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Ty<'tcx>

source§

fn new_tup(interner: TyCtxt<'tcx>, tys: &[Ty<'tcx>]) -> Ty<'tcx>

source§

fn new_tup_from_iter<It, T>( interner: TyCtxt<'tcx>, iter: It, ) -> <T as CollectAndApply<Ty<'tcx>, Ty<'tcx>>>::Output
where It: Iterator<Item = T>, T: CollectAndApply<Ty<'tcx>, Ty<'tcx>>,

source§

fn tuple_fields(self) -> &'tcx RawList<(), Ty<'tcx>>

source§

fn to_opt_closure_kind(self) -> Option<ClosureKind>

source§

fn from_closure_kind(interner: TyCtxt<'tcx>, kind: ClosureKind) -> Ty<'tcx>

source§

fn from_coroutine_closure_kind( interner: TyCtxt<'tcx>, kind: ClosureKind, ) -> Ty<'tcx>

source§

fn new_fn_def( interner: TyCtxt<'tcx>, def_id: DefId, args: &'tcx RawList<(), GenericArg<'tcx>>, ) -> Ty<'tcx>

source§

fn new_fn_ptr( interner: TyCtxt<'tcx>, sig: Binder<TyCtxt<'tcx>, FnSig<TyCtxt<'tcx>>>, ) -> Ty<'tcx>

source§

fn new_pat(interner: TyCtxt<'tcx>, ty: Ty<'tcx>, pat: Pattern<'tcx>) -> Ty<'tcx>

Implementors§