Trait rustc_type_ir::interner::Interner
source · pub trait Interner: Sized + Copy + IrPrint<AliasTy<Self>> + IrPrint<AliasTerm<Self>> + IrPrint<TraitRef<Self>> + IrPrint<TraitPredicate<Self>> + IrPrint<ExistentialTraitRef<Self>> + IrPrint<ExistentialProjection<Self>> + IrPrint<ProjectionPredicate<Self>> + IrPrint<NormalizesTo<Self>> + IrPrint<SubtypePredicate<Self>> + IrPrint<CoercePredicate<Self>> + IrPrint<FnSig<Self>> {
Show 70 associated items
type DefId: Copy + Debug + Hash + Eq + TypeFoldable<Self>;
type LocalDefId: Copy + Debug + Hash + Eq + Into<Self::DefId> + TypeFoldable<Self>;
type AdtDef: AdtDef<Self>;
type GenericArgs: GenericArgs<Self>;
type GenericArgsSlice: Copy + Debug + Hash + Eq + Deref<Target = [Self::GenericArg]>;
type GenericArg: GenericArg<Self>;
type Term: Term<Self>;
type BoundVarKinds: Copy + Debug + Hash + Eq + Deref<Target: Deref<Target = [Self::BoundVarKind]>> + Default;
type BoundVarKind: Copy + Debug + Hash + Eq;
type CanonicalVars: Copy + Debug + Hash + Eq + IntoIterator<Item = CanonicalVarInfo<Self>>;
type PredefinedOpaques: Copy + Debug + Hash + Eq;
type DefiningOpaqueTypes: Copy + Debug + Hash + Default + Eq + TypeVisitable<Self>;
type ExternalConstraints: Copy + Debug + Hash + Eq;
type CanonicalGoalEvaluationStepRef: Copy + Debug + Hash + Eq + Deref<Target = CanonicalGoalEvaluationStep<Self>>;
type Ty: Ty<Self>;
type Tys: Tys<Self>;
type FnInputTys: Copy + Debug + Hash + Eq + Deref<Target = [Self::Ty]> + TypeVisitable<Self>;
type ParamTy: Copy + Debug + Hash + Eq + ParamLike;
type BoundTy: Copy + Debug + Hash + Eq + BoundVarLike<Self>;
type PlaceholderTy: PlaceholderLike;
type ErrorGuaranteed: Copy + Debug + Hash + Eq;
type BoundExistentialPredicates: Copy + Debug + Hash + Eq + Relate<Self> + IntoIterator<Item = Binder<Self, ExistentialPredicate<Self>>>;
type AllocId: Copy + Debug + Hash + Eq;
type Pat: Copy + Debug + Hash + Eq + Relate<Self>;
type Safety: Safety<Self>;
type Abi: Abi<Self>;
type Const: Const<Self>;
type PlaceholderConst: PlaceholderLike;
type ParamConst: Copy + Debug + Hash + Eq + ParamLike;
type BoundConst: Copy + Debug + Hash + Eq + BoundVarLike<Self>;
type ValueConst: Copy + Debug + Hash + Eq;
type ExprConst: Copy + Debug + Hash + Eq + Relate<Self>;
type Region: Region<Self>;
type EarlyParamRegion: Copy + Debug + Hash + Eq + ParamLike;
type LateParamRegion: Copy + Debug + Hash + Eq;
type BoundRegion: Copy + Debug + Hash + Eq + BoundVarLike<Self>;
type PlaceholderRegion: PlaceholderLike;
type ParamEnv: Copy + Debug + Hash + Eq + TypeFoldable<Self>;
type Predicate: Predicate<Self>;
type Clause: Clause<Self>;
type Clauses: Copy + Debug + Hash + Eq + TypeSuperVisitable<Self> + Flags;
type GenericsOf: GenericsOf<Self>;
type VariancesOf: Copy + Debug + Deref<Target = [Variance]> + IntoIterator<Item: Deref<Target = Variance>>;
type Features: Features<Self>;
// Required methods
fn expand_abstract_consts<T: TypeFoldable<Self>>(self, t: T) -> T;
fn mk_canonical_var_infos(
self,
infos: &[CanonicalVarInfo<Self>],
) -> Self::CanonicalVars;
fn generics_of(self, def_id: Self::DefId) -> Self::GenericsOf;
fn variances_of(self, def_id: Self::DefId) -> Self::VariancesOf;
fn type_of(self, def_id: Self::DefId) -> EarlyBinder<Self, Self::Ty>;
fn alias_ty_kind(self, alias: AliasTy<Self>) -> AliasTyKind;
fn alias_term_kind(self, alias: AliasTerm<Self>) -> AliasTermKind;
fn trait_ref_and_own_args_for_alias(
self,
def_id: Self::DefId,
args: Self::GenericArgs,
) -> (TraitRef<Self>, Self::GenericArgsSlice);
fn mk_args(self, args: &[Self::GenericArg]) -> Self::GenericArgs;
fn mk_args_from_iter<I, T>(self, args: I) -> T::Output
where I: Iterator<Item = T>,
T: CollectAndApply<Self::GenericArg, Self::GenericArgs>;
fn check_and_mk_args(
self,
def_id: Self::DefId,
args: impl IntoIterator<Item: Into<Self::GenericArg>>,
) -> Self::GenericArgs;
fn intern_canonical_goal_evaluation_step(
self,
step: CanonicalGoalEvaluationStep<Self>,
) -> Self::CanonicalGoalEvaluationStepRef;
fn mk_type_list_from_iter<I, T>(self, args: I) -> T::Output
where I: Iterator<Item = T>,
T: CollectAndApply<Self::Ty, Self::Tys>;
fn parent(self, def_id: Self::DefId) -> Self::DefId;
fn recursion_limit(self) -> usize;
fn features(self) -> Self::Features;
fn bound_coroutine_hidden_types(
self,
def_id: Self::DefId,
) -> impl IntoIterator<Item = EarlyBinder<Self, Binder<Self, Self::Ty>>>;
fn fn_sig(
self,
def_id: Self::DefId,
) -> EarlyBinder<Self, Binder<Self, FnSig<Self>>>;
fn coroutine_movability(self, def_id: Self::DefId) -> Movability;
fn coroutine_for_closure(self, def_id: Self::DefId) -> Self::DefId;
fn generics_require_sized_self(self, def_id: Self::DefId) -> bool;
fn item_bounds(
self,
def_id: Self::DefId,
) -> EarlyBinder<Self, impl IntoIterator<Item = Self::Clause>>;
fn super_predicates_of(
self,
def_id: Self::DefId,
) -> EarlyBinder<Self, impl IntoIterator<Item = Self::Clause>>;
fn has_target_features(self, def_id: Self::DefId) -> bool;
fn require_lang_item(self, lang_item: TraitSolverLangItem) -> Self::DefId;
fn associated_type_def_ids(
self,
def_id: Self::DefId,
) -> impl IntoIterator<Item = Self::DefId>;
}Required Associated Types§
type DefId: Copy + Debug + Hash + Eq + TypeFoldable<Self>
type LocalDefId: Copy + Debug + Hash + Eq + Into<Self::DefId> + TypeFoldable<Self>
type AdtDef: AdtDef<Self>
type GenericArgs: GenericArgs<Self>
type GenericArgsSlice: Copy + Debug + Hash + Eq + Deref<Target = [Self::GenericArg]>
type GenericArg: GenericArg<Self>
type Term: Term<Self>
type BoundVarKinds: Copy + Debug + Hash + Eq + Deref<Target: Deref<Target = [Self::BoundVarKind]>> + Default
type BoundVarKind: Copy + Debug + Hash + Eq
type CanonicalVars: Copy + Debug + Hash + Eq + IntoIterator<Item = CanonicalVarInfo<Self>>
type PredefinedOpaques: Copy + Debug + Hash + Eq
type DefiningOpaqueTypes: Copy + Debug + Hash + Default + Eq + TypeVisitable<Self>
type ExternalConstraints: Copy + Debug + Hash + Eq
type CanonicalGoalEvaluationStepRef: Copy + Debug + Hash + Eq + Deref<Target = CanonicalGoalEvaluationStep<Self>>
type Ty: Ty<Self>
type Tys: Tys<Self>
type FnInputTys: Copy + Debug + Hash + Eq + Deref<Target = [Self::Ty]> + TypeVisitable<Self>
type ParamTy: Copy + Debug + Hash + Eq + ParamLike
type BoundTy: Copy + Debug + Hash + Eq + BoundVarLike<Self>
type PlaceholderTy: PlaceholderLike
type ErrorGuaranteed: Copy + Debug + Hash + Eq
type BoundExistentialPredicates: Copy + Debug + Hash + Eq + Relate<Self> + IntoIterator<Item = Binder<Self, ExistentialPredicate<Self>>>
type AllocId: Copy + Debug + Hash + Eq
type Pat: Copy + Debug + Hash + Eq + Relate<Self>
type Safety: Safety<Self>
type Abi: Abi<Self>
type Const: Const<Self>
type PlaceholderConst: PlaceholderLike
type ParamConst: Copy + Debug + Hash + Eq + ParamLike
type BoundConst: Copy + Debug + Hash + Eq + BoundVarLike<Self>
type ValueConst: Copy + Debug + Hash + Eq
type ExprConst: Copy + Debug + Hash + Eq + Relate<Self>
type Region: Region<Self>
type EarlyParamRegion: Copy + Debug + Hash + Eq + ParamLike
type LateParamRegion: Copy + Debug + Hash + Eq
type BoundRegion: Copy + Debug + Hash + Eq + BoundVarLike<Self>
type PlaceholderRegion: PlaceholderLike
type ParamEnv: Copy + Debug + Hash + Eq + TypeFoldable<Self>
type Predicate: Predicate<Self>
type Clause: Clause<Self>
type Clauses: Copy + Debug + Hash + Eq + TypeSuperVisitable<Self> + Flags
type GenericsOf: GenericsOf<Self>
type VariancesOf: Copy + Debug + Deref<Target = [Variance]> + IntoIterator<Item: Deref<Target = Variance>>
type Features: Features<Self>
Required Methods§
fn expand_abstract_consts<T: TypeFoldable<Self>>(self, t: T) -> T
fn mk_canonical_var_infos( self, infos: &[CanonicalVarInfo<Self>], ) -> Self::CanonicalVars
fn generics_of(self, def_id: Self::DefId) -> Self::GenericsOf
fn variances_of(self, def_id: Self::DefId) -> Self::VariancesOf
fn type_of(self, def_id: Self::DefId) -> EarlyBinder<Self, Self::Ty>
fn alias_ty_kind(self, alias: AliasTy<Self>) -> AliasTyKind
fn alias_term_kind(self, alias: AliasTerm<Self>) -> AliasTermKind
fn trait_ref_and_own_args_for_alias( self, def_id: Self::DefId, args: Self::GenericArgs, ) -> (TraitRef<Self>, Self::GenericArgsSlice)
fn mk_args(self, args: &[Self::GenericArg]) -> Self::GenericArgs
fn mk_args_from_iter<I, T>(self, args: I) -> T::Output
fn check_and_mk_args( self, def_id: Self::DefId, args: impl IntoIterator<Item: Into<Self::GenericArg>>, ) -> Self::GenericArgs
fn intern_canonical_goal_evaluation_step( self, step: CanonicalGoalEvaluationStep<Self>, ) -> Self::CanonicalGoalEvaluationStepRef
fn mk_type_list_from_iter<I, T>(self, args: I) -> T::Output
fn parent(self, def_id: Self::DefId) -> Self::DefId
fn recursion_limit(self) -> usize
fn features(self) -> Self::Features
fn fn_sig( self, def_id: Self::DefId, ) -> EarlyBinder<Self, Binder<Self, FnSig<Self>>>
fn coroutine_movability(self, def_id: Self::DefId) -> Movability
fn coroutine_for_closure(self, def_id: Self::DefId) -> Self::DefId
fn generics_require_sized_self(self, def_id: Self::DefId) -> bool
fn item_bounds( self, def_id: Self::DefId, ) -> EarlyBinder<Self, impl IntoIterator<Item = Self::Clause>>
fn super_predicates_of( self, def_id: Self::DefId, ) -> EarlyBinder<Self, impl IntoIterator<Item = Self::Clause>>
fn has_target_features(self, def_id: Self::DefId) -> bool
fn require_lang_item(self, lang_item: TraitSolverLangItem) -> Self::DefId
fn associated_type_def_ids( self, def_id: Self::DefId, ) -> impl IntoIterator<Item = Self::DefId>
Object Safety§
This trait is not object safe.