Trait rustc_infer::infer::canonical::ir::InferCtxtLike

source ·
pub trait InferCtxtLike: Sized {
    type Interner: Interner;

Show 28 methods // Required methods fn cx(&self) -> Self::Interner; fn solver_mode(&self) -> SolverMode; fn universe(&self) -> UniverseIndex; fn create_next_universe(&self) -> UniverseIndex; fn universe_of_ty(&self, ty: TyVid) -> Option<UniverseIndex>; fn universe_of_lt(&self, lt: RegionVid) -> Option<UniverseIndex>; fn universe_of_ct(&self, ct: ConstVid) -> Option<UniverseIndex>; fn root_ty_var(&self, var: TyVid) -> TyVid; fn root_const_var(&self, var: ConstVid) -> ConstVid; fn opportunistic_resolve_ty_var( &self, vid: TyVid, ) -> <Self::Interner as Interner>::Ty; fn opportunistic_resolve_int_var( &self, vid: IntVid, ) -> <Self::Interner as Interner>::Ty; fn opportunistic_resolve_float_var( &self, vid: FloatVid, ) -> <Self::Interner as Interner>::Ty; fn opportunistic_resolve_ct_var( &self, vid: ConstVid, ) -> <Self::Interner as Interner>::Const; fn opportunistic_resolve_effect_var( &self, vid: EffectVid, ) -> <Self::Interner as Interner>::Const; fn opportunistic_resolve_lt_var( &self, vid: RegionVid, ) -> <Self::Interner as Interner>::Region; fn defining_opaque_types( &self, ) -> <Self::Interner as Interner>::DefiningOpaqueTypes; fn next_ty_infer(&self) -> <Self::Interner as Interner>::Ty; fn next_const_infer(&self) -> <Self::Interner as Interner>::Const; fn fresh_args_for_item( &self, def_id: <Self::Interner as Interner>::DefId, ) -> <Self::Interner as Interner>::GenericArgs; fn instantiate_binder_with_infer<T>( &self, value: Binder<Self::Interner, T>, ) -> T where T: TypeFoldable<Self::Interner> + Copy; fn enter_forall<T, U>( &self, value: Binder<Self::Interner, T>, f: impl FnOnce(T) -> U, ) -> U where T: TypeFoldable<Self::Interner> + Copy; fn relate<T>( &self, param_env: <Self::Interner as Interner>::ParamEnv, lhs: T, variance: Variance, rhs: T, ) -> Result<Vec<Goal<Self::Interner, <Self::Interner as Interner>::Predicate>>, NoSolution> where T: Relate<Self::Interner>; fn eq_structurally_relating_aliases<T>( &self, param_env: <Self::Interner as Interner>::ParamEnv, lhs: T, rhs: T, ) -> Result<Vec<Goal<Self::Interner, <Self::Interner as Interner>::Predicate>>, NoSolution> where T: Relate<Self::Interner>; fn shallow_resolve( &self, ty: <Self::Interner as Interner>::Ty, ) -> <Self::Interner as Interner>::Ty; fn resolve_vars_if_possible<T>(&self, value: T) -> T where T: TypeFoldable<Self::Interner>; fn probe<T>(&self, probe: impl FnOnce() -> T) -> T; fn sub_regions( &self, sub: <Self::Interner as Interner>::Region, sup: <Self::Interner as Interner>::Region, ); fn register_ty_outlives( &self, ty: <Self::Interner as Interner>::Ty, r: <Self::Interner as Interner>::Region, );
}

Required Associated Types§

Required Methods§

source

fn cx(&self) -> Self::Interner

source

fn solver_mode(&self) -> SolverMode

source

fn universe(&self) -> UniverseIndex

source

fn create_next_universe(&self) -> UniverseIndex

source

fn universe_of_ty(&self, ty: TyVid) -> Option<UniverseIndex>

source

fn universe_of_lt(&self, lt: RegionVid) -> Option<UniverseIndex>

source

fn universe_of_ct(&self, ct: ConstVid) -> Option<UniverseIndex>

source

fn root_ty_var(&self, var: TyVid) -> TyVid

source

fn root_const_var(&self, var: ConstVid) -> ConstVid

source

fn opportunistic_resolve_ty_var( &self, vid: TyVid, ) -> <Self::Interner as Interner>::Ty

source

fn opportunistic_resolve_int_var( &self, vid: IntVid, ) -> <Self::Interner as Interner>::Ty

source

fn opportunistic_resolve_float_var( &self, vid: FloatVid, ) -> <Self::Interner as Interner>::Ty

source

fn opportunistic_resolve_ct_var( &self, vid: ConstVid, ) -> <Self::Interner as Interner>::Const

source

fn opportunistic_resolve_effect_var( &self, vid: EffectVid, ) -> <Self::Interner as Interner>::Const

source

fn opportunistic_resolve_lt_var( &self, vid: RegionVid, ) -> <Self::Interner as Interner>::Region

source

fn defining_opaque_types( &self, ) -> <Self::Interner as Interner>::DefiningOpaqueTypes

source

fn next_ty_infer(&self) -> <Self::Interner as Interner>::Ty

source

fn next_const_infer(&self) -> <Self::Interner as Interner>::Const

source

fn fresh_args_for_item( &self, def_id: <Self::Interner as Interner>::DefId, ) -> <Self::Interner as Interner>::GenericArgs

source

fn instantiate_binder_with_infer<T>( &self, value: Binder<Self::Interner, T>, ) -> T
where T: TypeFoldable<Self::Interner> + Copy,

source

fn enter_forall<T, U>( &self, value: Binder<Self::Interner, T>, f: impl FnOnce(T) -> U, ) -> U
where T: TypeFoldable<Self::Interner> + Copy,

source

fn relate<T>( &self, param_env: <Self::Interner as Interner>::ParamEnv, lhs: T, variance: Variance, rhs: T, ) -> Result<Vec<Goal<Self::Interner, <Self::Interner as Interner>::Predicate>>, NoSolution>
where T: Relate<Self::Interner>,

source

fn eq_structurally_relating_aliases<T>( &self, param_env: <Self::Interner as Interner>::ParamEnv, lhs: T, rhs: T, ) -> Result<Vec<Goal<Self::Interner, <Self::Interner as Interner>::Predicate>>, NoSolution>
where T: Relate<Self::Interner>,

source

fn shallow_resolve( &self, ty: <Self::Interner as Interner>::Ty, ) -> <Self::Interner as Interner>::Ty

source

fn resolve_vars_if_possible<T>(&self, value: T) -> T
where T: TypeFoldable<Self::Interner>,

source

fn probe<T>(&self, probe: impl FnOnce() -> T) -> T

source

fn sub_regions( &self, sub: <Self::Interner as Interner>::Region, sup: <Self::Interner as Interner>::Region, )

source

fn register_ty_outlives( &self, ty: <Self::Interner as Interner>::Ty, r: <Self::Interner as Interner>::Region, )

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'tcx> InferCtxtLike for InferCtxt<'tcx>