Interner

Trait Interner 

pub trait Interner:
    Sized
    + Copy
    + IrPrint<AliasTy<Self>>
    + IrPrint<AliasTerm<Self>>
    + IrPrint<TraitRef<Self>>
    + IrPrint<TraitPredicate<Self>>
    + IrPrint<HostEffectPredicate<Self>>
    + IrPrint<ExistentialTraitRef<Self>>
    + IrPrint<ExistentialProjection<Self>>
    + IrPrint<ProjectionPredicate<Self>>
    + IrPrint<NormalizesTo<Self>>
    + IrPrint<SubtypePredicate<Self>>
    + IrPrint<CoercePredicate<Self>>
    + IrPrint<FnSig<Self>>
    + IrPrint<PatternKind<Self>> {
Show 149 associated items type DefId: DefId<Self>; type LocalDefId: Copy + Debug + Hash + Eq + Into<Self::DefId> + TypeFoldable<Self>; type TraitId: SpecificDefId<Self>; type ForeignId: SpecificDefId<Self>; type FunctionId: SpecificDefId<Self>; type ClosureId: SpecificDefId<Self>; type CoroutineClosureId: SpecificDefId<Self>; type CoroutineId: SpecificDefId<Self>; type AdtId: SpecificDefId<Self>; type ImplId: SpecificDefId<Self>; type UnevaluatedConstId: SpecificDefId<Self>; type Span: Span<Self>; type GenericArgs: GenericArgs<Self>; type GenericArgsSlice: Copy + Debug + Hash + Eq + SliceLike<Item = Self::GenericArg>; type GenericArg: GenericArg<Self>; type Term: Term<Self>; type BoundVarKinds: Copy + Debug + Hash + Eq + SliceLike<Item = Self::BoundVarKind> + Default; type BoundVarKind: Copy + Debug + Hash + Eq; type PredefinedOpaques: Copy + Debug + Hash + Eq + TypeFoldable<Self> + SliceLike<Item = (OpaqueTypeKey<Self>, Self::Ty)>; type LocalDefIds: Copy + Debug + Hash + Default + Eq + TypeVisitable<Self> + SliceLike<Item = Self::LocalDefId>; type CanonicalVarKinds: Copy + Debug + Hash + Eq + SliceLike<Item = CanonicalVarKind<Self>> + Default; type ExternalConstraints: Copy + Debug + Hash + Eq + TypeFoldable<Self> + Deref<Target = ExternalConstraintsData<Self>>; type DepNodeIndex; type Tracked<T: Debug + Clone>: Debug; type Ty: Ty<Self>; type Tys: Tys<Self>; type FnInputTys: Copy + Debug + Hash + Eq + SliceLike<Item = Self::Ty> + TypeVisitable<Self>; type ParamTy: ParamLike; type BoundTy: BoundVarLike<Self>; type PlaceholderTy: PlaceholderLike<Self, Bound = Self::BoundTy>; type Symbol: Copy + Hash + PartialEq + Eq + Debug; type ErrorGuaranteed: Copy + Debug + Hash + Eq; type BoundExistentialPredicates: BoundExistentialPredicates<Self>; type AllocId: Copy + Debug + Hash + Eq; type Pat: Copy + Debug + Hash + Eq + Relate<Self> + Flags + IntoKind<Kind = PatternKind<Self>>; type PatList: Copy + Debug + Hash + Default + Eq + TypeVisitable<Self> + SliceLike<Item = Self::Pat>; type Safety: Safety<Self>; type Abi: Abi<Self>; type Const: Const<Self>; type ParamConst: Copy + Debug + Hash + Eq + ParamLike; type BoundConst: BoundVarLike<Self>; type PlaceholderConst: PlaceholderConst<Self>; type ValueConst: ValueConst<Self>; type ExprConst: ExprConst<Self>; type ValTree: Copy + Debug + Hash + Eq; type Region: Region<Self>; type EarlyParamRegion: ParamLike; type LateParamRegion: Copy + Debug + Hash + Eq; type BoundRegion: BoundVarLike<Self>; type PlaceholderRegion: PlaceholderLike<Self, Bound = Self::BoundRegion>; type RegionAssumptions: Copy + Debug + Hash + Eq + SliceLike<Item = OutlivesPredicate<Self, Self::GenericArg>> + TypeFoldable<Self>; type ParamEnv: ParamEnv<Self>; type Predicate: Predicate<Self>; type Clause: Clause<Self>; type Clauses: Clauses<Self>; type GenericsOf: GenericsOf<Self>; type VariancesOf: Copy + Debug + SliceLike<Item = Variance>; type AdtDef: AdtDef<Self>; type Features: Features<Self>; type UnsizingParams: Deref<Target = DenseBitSet<u32>>; type Probe: Debug + Hash + Eq + Borrow<Probe<Self>>; // Required methods fn mk_predefined_opaques_in_body( self, data: &[(OpaqueTypeKey<Self>, Self::Ty)], ) -> Self::PredefinedOpaques; fn mk_canonical_var_kinds( self, kinds: &[CanonicalVarKind<Self>], ) -> Self::CanonicalVarKinds; fn mk_external_constraints( self, data: ExternalConstraintsData<Self>, ) -> Self::ExternalConstraints; fn mk_tracked<T>( self, data: T, dep_node: Self::DepNodeIndex, ) -> Self::Tracked<T> where T: Debug + Clone; fn get_tracked<T>(self, tracked: &Self::Tracked<T>) -> T where T: Debug + Clone; fn with_cached_task<T>( self, task: impl FnOnce() -> T, ) -> (T, Self::DepNodeIndex); fn with_global_cache<R>( self, f: impl FnOnce(&mut GlobalCache<Self>) -> R, ) -> R; fn canonical_param_env_cache_get_or_insert<R>( self, param_env: Self::ParamEnv, f: impl FnOnce() -> CanonicalParamEnvCacheEntry<Self>, from_entry: impl FnOnce(&CanonicalParamEnvCacheEntry<Self>) -> R, ) -> R; fn assert_evaluation_is_concurrent(&self); fn expand_abstract_consts<T>(self, t: T) -> T where T: TypeFoldable<Self>; fn generics_of(self, def_id: Self::DefId) -> Self::GenericsOf; fn variances_of(self, def_id: Self::DefId) -> Self::VariancesOf; fn opt_alias_variances( self, kind: impl Into<AliasTermKind>, def_id: Self::DefId, ) -> Option<Self::VariancesOf>; fn type_of(self, def_id: Self::DefId) -> EarlyBinder<Self, Self::Ty>; fn type_of_opaque_hir_typeck( self, def_id: Self::LocalDefId, ) -> EarlyBinder<Self, Self::Ty>; fn const_of_item( self, def_id: Self::DefId, ) -> EarlyBinder<Self, Self::Const>; fn adt_def(self, adt_def_id: Self::AdtId) -> Self::AdtDef; 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 as CollectAndApply<Self::GenericArg, Self::GenericArgs>>::Output where I: Iterator<Item = T>, T: CollectAndApply<Self::GenericArg, Self::GenericArgs>; fn check_args_compatible( self, def_id: Self::DefId, args: Self::GenericArgs, ) -> bool; fn debug_assert_args_compatible( self, def_id: Self::DefId, args: Self::GenericArgs, ); fn debug_assert_existential_args_compatible( self, def_id: Self::DefId, args: Self::GenericArgs, ); fn mk_type_list_from_iter<I, T>( self, args: I, ) -> <T as CollectAndApply<Self::Ty, Self::Tys>>::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 coroutine_hidden_types( self, def_id: Self::CoroutineId, ) -> EarlyBinder<Self, Binder<Self, CoroutineWitnessTypes<Self>>>; fn fn_sig( self, def_id: Self::FunctionId, ) -> EarlyBinder<Self, Binder<Self, FnSig<Self>>>; fn coroutine_movability(self, def_id: Self::CoroutineId) -> Movability; fn coroutine_for_closure( self, def_id: Self::CoroutineClosureId, ) -> Self::CoroutineId; 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 item_self_bounds( self, def_id: Self::DefId, ) -> EarlyBinder<Self, impl IntoIterator<Item = Self::Clause>>; fn item_non_self_bounds( self, def_id: Self::DefId, ) -> EarlyBinder<Self, impl IntoIterator<Item = Self::Clause>>; fn predicates_of( self, def_id: Self::DefId, ) -> EarlyBinder<Self, impl IntoIterator<Item = Self::Clause>>; fn own_predicates_of( self, def_id: Self::DefId, ) -> EarlyBinder<Self, impl IntoIterator<Item = Self::Clause>>; fn explicit_super_predicates_of( self, def_id: Self::TraitId, ) -> EarlyBinder<Self, impl IntoIterator<Item = (Self::Clause, Self::Span)>>; fn explicit_implied_predicates_of( self, def_id: Self::DefId, ) -> EarlyBinder<Self, impl IntoIterator<Item = (Self::Clause, Self::Span)>>; fn impl_super_outlives( self, impl_def_id: Self::ImplId, ) -> EarlyBinder<Self, impl IntoIterator<Item = Self::Clause>>; fn impl_is_const(self, def_id: Self::ImplId) -> bool; fn fn_is_const(self, def_id: Self::FunctionId) -> bool; fn alias_has_const_conditions(self, def_id: Self::DefId) -> bool; fn const_conditions( self, def_id: Self::DefId, ) -> EarlyBinder<Self, impl IntoIterator<Item = Binder<Self, TraitRef<Self>>>>; fn explicit_implied_const_bounds( self, def_id: Self::DefId, ) -> EarlyBinder<Self, impl IntoIterator<Item = Binder<Self, TraitRef<Self>>>>; fn impl_self_is_guaranteed_unsized(self, def_id: Self::ImplId) -> bool; fn has_target_features(self, def_id: Self::FunctionId) -> bool; fn require_lang_item(self, lang_item: SolverLangItem) -> Self::DefId; fn require_trait_lang_item( self, lang_item: SolverTraitLangItem, ) -> Self::TraitId; fn require_adt_lang_item(self, lang_item: SolverAdtLangItem) -> Self::AdtId; fn is_lang_item( self, def_id: Self::DefId, lang_item: SolverLangItem, ) -> bool; fn is_trait_lang_item( self, def_id: Self::TraitId, lang_item: SolverTraitLangItem, ) -> bool; fn is_adt_lang_item( self, def_id: Self::AdtId, lang_item: SolverAdtLangItem, ) -> bool; fn is_default_trait(self, def_id: Self::TraitId) -> bool; fn is_sizedness_trait(self, def_id: Self::TraitId) -> bool; fn as_lang_item(self, def_id: Self::DefId) -> Option<SolverLangItem>; fn as_trait_lang_item( self, def_id: Self::TraitId, ) -> Option<SolverTraitLangItem>; fn as_adt_lang_item(self, def_id: Self::AdtId) -> Option<SolverAdtLangItem>; fn associated_type_def_ids( self, def_id: Self::TraitId, ) -> impl IntoIterator<Item = Self::DefId>; fn for_each_relevant_impl( self, trait_def_id: Self::TraitId, self_ty: Self::Ty, f: impl FnMut(Self::ImplId), ); fn for_each_blanket_impl( self, trait_def_id: Self::TraitId, f: impl FnMut(Self::ImplId), ); fn has_item_definition(self, def_id: Self::DefId) -> bool; fn impl_specializes( self, impl_def_id: Self::ImplId, victim_def_id: Self::ImplId, ) -> bool; fn impl_is_default(self, impl_def_id: Self::ImplId) -> bool; fn impl_trait_ref( self, impl_def_id: Self::ImplId, ) -> EarlyBinder<Self, TraitRef<Self>>; fn impl_polarity(self, impl_def_id: Self::ImplId) -> ImplPolarity; fn trait_is_auto(self, trait_def_id: Self::TraitId) -> bool; fn trait_is_coinductive(self, trait_def_id: Self::TraitId) -> bool; fn trait_is_alias(self, trait_def_id: Self::TraitId) -> bool; fn trait_is_dyn_compatible(self, trait_def_id: Self::TraitId) -> bool; fn trait_is_fundamental(self, def_id: Self::TraitId) -> bool; fn trait_may_be_implemented_via_object( self, trait_def_id: Self::TraitId, ) -> bool; fn trait_is_unsafe(self, trait_def_id: Self::TraitId) -> bool; fn is_impl_trait_in_trait(self, def_id: Self::DefId) -> bool; fn delay_bug(self, msg: impl ToString) -> Self::ErrorGuaranteed; fn is_general_coroutine(self, coroutine_def_id: Self::CoroutineId) -> bool; fn coroutine_is_async(self, coroutine_def_id: Self::CoroutineId) -> bool; fn coroutine_is_gen(self, coroutine_def_id: Self::CoroutineId) -> bool; fn coroutine_is_async_gen(self, coroutine_def_id: Self::CoroutineId) -> bool; fn unsizing_params_for_adt( self, adt_def_id: Self::AdtId, ) -> Self::UnsizingParams; fn anonymize_bound_vars<T>(self, binder: Binder<Self, T>) -> Binder<Self, T> where T: TypeFoldable<Self>; fn opaque_types_defined_by( self, defining_anchor: Self::LocalDefId, ) -> Self::LocalDefIds; fn opaque_types_and_coroutines_defined_by( self, defining_anchor: Self::LocalDefId, ) -> Self::LocalDefIds; fn mk_probe(self, probe: Probe<Self>) -> Self::Probe; fn evaluate_root_goal_for_proof_tree_raw( self, canonical_goal: CanonicalQueryInput<Self, QueryInput<Self, Self::Predicate>>, ) -> (Result<Canonical<Self, Response<Self>>, NoSolution>, Self::Probe); // Provided method fn next_trait_solver_globally(self) -> bool { ... }
}

Required Associated Types§

type DefId: DefId<Self>

type LocalDefId: Copy + Debug + Hash + Eq + Into<Self::DefId> + TypeFoldable<Self>

type TraitId: SpecificDefId<Self>

type ForeignId: SpecificDefId<Self>

type FunctionId: SpecificDefId<Self>

type ClosureId: SpecificDefId<Self>

type CoroutineClosureId: SpecificDefId<Self>

type CoroutineId: SpecificDefId<Self>

type AdtId: SpecificDefId<Self>

type ImplId: SpecificDefId<Self>

type UnevaluatedConstId: SpecificDefId<Self>

type Span: Span<Self>

type GenericArgs: GenericArgs<Self>

type GenericArgsSlice: Copy + Debug + Hash + Eq + SliceLike<Item = Self::GenericArg>

type GenericArg: GenericArg<Self>

type Term: Term<Self>

type BoundVarKinds: Copy + Debug + Hash + Eq + SliceLike<Item = Self::BoundVarKind> + Default

type BoundVarKind: Copy + Debug + Hash + Eq

type PredefinedOpaques: Copy + Debug + Hash + Eq + TypeFoldable<Self> + SliceLike<Item = (OpaqueTypeKey<Self>, Self::Ty)>

type LocalDefIds: Copy + Debug + Hash + Default + Eq + TypeVisitable<Self> + SliceLike<Item = Self::LocalDefId>

type CanonicalVarKinds: Copy + Debug + Hash + Eq + SliceLike<Item = CanonicalVarKind<Self>> + Default

type ExternalConstraints: Copy + Debug + Hash + Eq + TypeFoldable<Self> + Deref<Target = ExternalConstraintsData<Self>>

type DepNodeIndex

type Tracked<T: Debug + Clone>: Debug

type Ty: Ty<Self>

type Tys: Tys<Self>

type FnInputTys: Copy + Debug + Hash + Eq + SliceLike<Item = Self::Ty> + TypeVisitable<Self>

type ParamTy: ParamLike

type BoundTy: BoundVarLike<Self>

type PlaceholderTy: PlaceholderLike<Self, Bound = Self::BoundTy>

type Symbol: Copy + Hash + PartialEq + Eq + Debug

type ErrorGuaranteed: Copy + Debug + Hash + Eq

type BoundExistentialPredicates: BoundExistentialPredicates<Self>

type AllocId: Copy + Debug + Hash + Eq

type Pat: Copy + Debug + Hash + Eq + Relate<Self> + Flags + IntoKind<Kind = PatternKind<Self>>

type PatList: Copy + Debug + Hash + Default + Eq + TypeVisitable<Self> + SliceLike<Item = Self::Pat>

type Safety: Safety<Self>

type Abi: Abi<Self>

type Const: Const<Self>

type ParamConst: Copy + Debug + Hash + Eq + ParamLike

type BoundConst: BoundVarLike<Self>

type PlaceholderConst: PlaceholderConst<Self>

type ValueConst: ValueConst<Self>

type ExprConst: ExprConst<Self>

type ValTree: Copy + Debug + Hash + Eq

type Region: Region<Self>

type EarlyParamRegion: ParamLike

type LateParamRegion: Copy + Debug + Hash + Eq

type BoundRegion: BoundVarLike<Self>

type PlaceholderRegion: PlaceholderLike<Self, Bound = Self::BoundRegion>

type RegionAssumptions: Copy + Debug + Hash + Eq + SliceLike<Item = OutlivesPredicate<Self, Self::GenericArg>> + TypeFoldable<Self>

type ParamEnv: ParamEnv<Self>

type Predicate: Predicate<Self>

type Clause: Clause<Self>

type Clauses: Clauses<Self>

type GenericsOf: GenericsOf<Self>

type VariancesOf: Copy + Debug + SliceLike<Item = Variance>

type AdtDef: AdtDef<Self>

type Features: Features<Self>

type UnsizingParams: Deref<Target = DenseBitSet<u32>>

type Probe: Debug + Hash + Eq + Borrow<Probe<Self>>

Required Methods§

fn mk_predefined_opaques_in_body( self, data: &[(OpaqueTypeKey<Self>, Self::Ty)], ) -> Self::PredefinedOpaques

fn mk_canonical_var_kinds( self, kinds: &[CanonicalVarKind<Self>], ) -> Self::CanonicalVarKinds

fn mk_external_constraints( self, data: ExternalConstraintsData<Self>, ) -> Self::ExternalConstraints

fn mk_tracked<T>( self, data: T, dep_node: Self::DepNodeIndex, ) -> Self::Tracked<T>
where T: Debug + Clone,

fn get_tracked<T>(self, tracked: &Self::Tracked<T>) -> T
where T: Debug + Clone,

fn with_cached_task<T>( self, task: impl FnOnce() -> T, ) -> (T, Self::DepNodeIndex)

fn with_global_cache<R>(self, f: impl FnOnce(&mut GlobalCache<Self>) -> R) -> R

fn canonical_param_env_cache_get_or_insert<R>( self, param_env: Self::ParamEnv, f: impl FnOnce() -> CanonicalParamEnvCacheEntry<Self>, from_entry: impl FnOnce(&CanonicalParamEnvCacheEntry<Self>) -> R, ) -> R

fn assert_evaluation_is_concurrent(&self)

Useful for testing. If a cache entry is replaced, this should (in theory) only happen when concurrent.

fn expand_abstract_consts<T>(self, t: T) -> T
where T: TypeFoldable<Self>,

fn generics_of(self, def_id: Self::DefId) -> Self::GenericsOf

fn variances_of(self, def_id: Self::DefId) -> Self::VariancesOf

fn opt_alias_variances( self, kind: impl Into<AliasTermKind>, def_id: Self::DefId, ) -> Option<Self::VariancesOf>

fn type_of(self, def_id: Self::DefId) -> EarlyBinder<Self, Self::Ty>

fn type_of_opaque_hir_typeck( self, def_id: Self::LocalDefId, ) -> EarlyBinder<Self, Self::Ty>

fn const_of_item(self, def_id: Self::DefId) -> EarlyBinder<Self, Self::Const>

fn adt_def(self, adt_def_id: Self::AdtId) -> Self::AdtDef

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 as CollectAndApply<Self::GenericArg, Self::GenericArgs>>::Output
where I: Iterator<Item = T>, T: CollectAndApply<Self::GenericArg, Self::GenericArgs>,

fn check_args_compatible( self, def_id: Self::DefId, args: Self::GenericArgs, ) -> bool

fn debug_assert_args_compatible( self, def_id: Self::DefId, args: Self::GenericArgs, )

fn debug_assert_existential_args_compatible( self, def_id: Self::DefId, args: Self::GenericArgs, )

Assert that the args from an ExistentialTraitRef or ExistentialProjection are compatible with the DefId.

fn mk_type_list_from_iter<I, T>( self, args: I, ) -> <T as CollectAndApply<Self::Ty, Self::Tys>>::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 coroutine_hidden_types( self, def_id: Self::CoroutineId, ) -> EarlyBinder<Self, Binder<Self, CoroutineWitnessTypes<Self>>>

fn fn_sig( self, def_id: Self::FunctionId, ) -> EarlyBinder<Self, Binder<Self, FnSig<Self>>>

fn coroutine_movability(self, def_id: Self::CoroutineId) -> Movability

fn coroutine_for_closure( self, def_id: Self::CoroutineClosureId, ) -> Self::CoroutineId

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 item_self_bounds( self, def_id: Self::DefId, ) -> EarlyBinder<Self, impl IntoIterator<Item = Self::Clause>>

fn item_non_self_bounds( self, def_id: Self::DefId, ) -> EarlyBinder<Self, impl IntoIterator<Item = Self::Clause>>

fn predicates_of( self, def_id: Self::DefId, ) -> EarlyBinder<Self, impl IntoIterator<Item = Self::Clause>>

fn own_predicates_of( self, def_id: Self::DefId, ) -> EarlyBinder<Self, impl IntoIterator<Item = Self::Clause>>

fn explicit_super_predicates_of( self, def_id: Self::TraitId, ) -> EarlyBinder<Self, impl IntoIterator<Item = (Self::Clause, Self::Span)>>

fn explicit_implied_predicates_of( self, def_id: Self::DefId, ) -> EarlyBinder<Self, impl IntoIterator<Item = (Self::Clause, Self::Span)>>

fn impl_super_outlives( self, impl_def_id: Self::ImplId, ) -> EarlyBinder<Self, impl IntoIterator<Item = Self::Clause>>

This is equivalent to computing the super-predicates of the trait for this impl and filtering them to the outlives predicates. This is purely for performance.

fn impl_is_const(self, def_id: Self::ImplId) -> bool

fn fn_is_const(self, def_id: Self::FunctionId) -> bool

fn alias_has_const_conditions(self, def_id: Self::DefId) -> bool

fn const_conditions( self, def_id: Self::DefId, ) -> EarlyBinder<Self, impl IntoIterator<Item = Binder<Self, TraitRef<Self>>>>

fn explicit_implied_const_bounds( self, def_id: Self::DefId, ) -> EarlyBinder<Self, impl IntoIterator<Item = Binder<Self, TraitRef<Self>>>>

fn impl_self_is_guaranteed_unsized(self, def_id: Self::ImplId) -> bool

fn has_target_features(self, def_id: Self::FunctionId) -> bool

fn require_lang_item(self, lang_item: SolverLangItem) -> Self::DefId

fn require_trait_lang_item( self, lang_item: SolverTraitLangItem, ) -> Self::TraitId

fn require_adt_lang_item(self, lang_item: SolverAdtLangItem) -> Self::AdtId

fn is_lang_item(self, def_id: Self::DefId, lang_item: SolverLangItem) -> bool

fn is_trait_lang_item( self, def_id: Self::TraitId, lang_item: SolverTraitLangItem, ) -> bool

fn is_adt_lang_item( self, def_id: Self::AdtId, lang_item: SolverAdtLangItem, ) -> bool

fn is_default_trait(self, def_id: Self::TraitId) -> bool

fn is_sizedness_trait(self, def_id: Self::TraitId) -> bool

fn as_lang_item(self, def_id: Self::DefId) -> Option<SolverLangItem>

fn as_trait_lang_item( self, def_id: Self::TraitId, ) -> Option<SolverTraitLangItem>

fn as_adt_lang_item(self, def_id: Self::AdtId) -> Option<SolverAdtLangItem>

fn associated_type_def_ids( self, def_id: Self::TraitId, ) -> impl IntoIterator<Item = Self::DefId>

fn for_each_relevant_impl( self, trait_def_id: Self::TraitId, self_ty: Self::Ty, f: impl FnMut(Self::ImplId), )

fn for_each_blanket_impl( self, trait_def_id: Self::TraitId, f: impl FnMut(Self::ImplId), )

fn has_item_definition(self, def_id: Self::DefId) -> bool

fn impl_specializes( self, impl_def_id: Self::ImplId, victim_def_id: Self::ImplId, ) -> bool

fn impl_is_default(self, impl_def_id: Self::ImplId) -> bool

fn impl_trait_ref( self, impl_def_id: Self::ImplId, ) -> EarlyBinder<Self, TraitRef<Self>>

fn impl_polarity(self, impl_def_id: Self::ImplId) -> ImplPolarity

fn trait_is_auto(self, trait_def_id: Self::TraitId) -> bool

fn trait_is_coinductive(self, trait_def_id: Self::TraitId) -> bool

fn trait_is_alias(self, trait_def_id: Self::TraitId) -> bool

fn trait_is_dyn_compatible(self, trait_def_id: Self::TraitId) -> bool

fn trait_is_fundamental(self, def_id: Self::TraitId) -> bool

fn trait_may_be_implemented_via_object( self, trait_def_id: Self::TraitId, ) -> bool

fn trait_is_unsafe(self, trait_def_id: Self::TraitId) -> bool

Returns true if this is an unsafe trait.

fn is_impl_trait_in_trait(self, def_id: Self::DefId) -> bool

fn delay_bug(self, msg: impl ToString) -> Self::ErrorGuaranteed

fn is_general_coroutine(self, coroutine_def_id: Self::CoroutineId) -> bool

fn coroutine_is_async(self, coroutine_def_id: Self::CoroutineId) -> bool

fn coroutine_is_gen(self, coroutine_def_id: Self::CoroutineId) -> bool

fn coroutine_is_async_gen(self, coroutine_def_id: Self::CoroutineId) -> bool

fn unsizing_params_for_adt( self, adt_def_id: Self::AdtId, ) -> Self::UnsizingParams

fn anonymize_bound_vars<T>(self, binder: Binder<Self, T>) -> Binder<Self, T>
where T: TypeFoldable<Self>,

fn opaque_types_defined_by( self, defining_anchor: Self::LocalDefId, ) -> Self::LocalDefIds

fn opaque_types_and_coroutines_defined_by( self, defining_anchor: Self::LocalDefId, ) -> Self::LocalDefIds

fn mk_probe(self, probe: Probe<Self>) -> Self::Probe

fn evaluate_root_goal_for_proof_tree_raw( self, canonical_goal: CanonicalQueryInput<Self, QueryInput<Self, Self::Predicate>>, ) -> (Result<Canonical<Self, Response<Self>>, NoSolution>, Self::Probe)

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl<'tcx> Interner for TyCtxt<'tcx>

§

fn debug_assert_existential_args_compatible( self, def_id: DefId, args: &'tcx RawList<(), GenericArg<'tcx>>, )

Assert that the args from an ExistentialTraitRef or ExistentialProjection are compatible with the DefId. Since we’re missing a Self type, stick on a dummy self type and forward to debug_assert_args_compatible.

§

type DefId = DefId

§

type LocalDefId = LocalDefId

§

type TraitId = DefId

§

type ForeignId = DefId

§

type FunctionId = DefId

§

type ClosureId = DefId

§

type CoroutineClosureId = DefId

§

type CoroutineId = DefId

§

type AdtId = DefId

§

type ImplId = DefId

§

type UnevaluatedConstId = DefId

§

type Span = Span

§

type GenericArgs = &'tcx RawList<(), GenericArg<'tcx>>

§

type GenericArgsSlice = &'tcx [GenericArg<'tcx>]

§

type GenericArg = GenericArg<'tcx>

§

type Term = Term<'tcx>

§

type BoundVarKinds = &'tcx RawList<(), BoundVariableKind>

§

type BoundVarKind = BoundVariableKind

§

type PredefinedOpaques = &'tcx RawList<(), (OpaqueTypeKey<TyCtxt<'tcx>>, Ty<'tcx>)>

§

type LocalDefIds = &'tcx RawList<(), LocalDefId>

§

type CanonicalVarKinds = &'tcx RawList<(), CanonicalVarKind<TyCtxt<'tcx>>>

§

type ExternalConstraints = ExternalConstraints<'tcx>

§

type DepNodeIndex = DepNodeIndex

§

type Ty = Ty<'tcx>

§

type Tys = &'tcx RawList<(), Ty<'tcx>>

§

type FnInputTys = &'tcx [Ty<'tcx>]

§

type ParamTy = ParamTy

§

type BoundTy = BoundTy

§

type Symbol = Symbol

§

type PlaceholderTy = Placeholder<TyCtxt<'tcx>, BoundTy>

§

type ErrorGuaranteed = ErrorGuaranteed

§

type BoundExistentialPredicates = &'tcx RawList<(), Binder<TyCtxt<'tcx>, ExistentialPredicate<TyCtxt<'tcx>>>>

§

type AllocId = AllocId

§

type Pat = Pattern<'tcx>

§

type PatList = &'tcx RawList<(), Pattern<'tcx>>

§

type Safety = Safety

§

type Abi = ExternAbi

§

type Const = Const<'tcx>

§

type PlaceholderConst = Placeholder<TyCtxt<'tcx>, BoundConst>

§

type ParamConst = ParamConst

§

type BoundConst = BoundConst

§

type ValueConst = Value<'tcx>

§

type ExprConst = Expr<'tcx>

§

type ValTree = ValTree<'tcx>

§

type Region = Region<'tcx>

§

type EarlyParamRegion = EarlyParamRegion

§

type LateParamRegion = LateParamRegion

§

type BoundRegion = BoundRegion

§

type PlaceholderRegion = Placeholder<TyCtxt<'tcx>, BoundRegion>

§

type RegionAssumptions = &'tcx RawList<(), OutlivesPredicate<TyCtxt<'tcx>, GenericArg<'tcx>>>

§

type ParamEnv = ParamEnv<'tcx>

§

type Predicate = Predicate<'tcx>

§

type Clause = Clause<'tcx>

§

type Clauses = &'tcx RawList<TypeInfo, Clause<'tcx>>

§

type Tracked<T: Debug + Clone> = WithDepNode<T>

§

type GenericsOf = &'tcx Generics

§

type VariancesOf = &'tcx [Variance]

§

type AdtDef = AdtDef<'tcx>

§

type Features = &'tcx Features

§

type UnsizingParams = &'tcx DenseBitSet<u32>

§

type Probe = &'tcx Probe<TyCtxt<'tcx>>

§

fn next_trait_solver_globally(self) -> bool

§

fn mk_predefined_opaques_in_body( self, data: &[(OpaqueTypeKey<TyCtxt<'tcx>>, Ty<'tcx>)], ) -> &'tcx RawList<(), (OpaqueTypeKey<TyCtxt<'tcx>>, Ty<'tcx>)>

§

fn mk_canonical_var_kinds( self, kinds: &[CanonicalVarKind<TyCtxt<'tcx>>], ) -> &'tcx RawList<(), CanonicalVarKind<TyCtxt<'tcx>>>

§

fn mk_external_constraints( self, data: ExternalConstraintsData<TyCtxt<'tcx>>, ) -> ExternalConstraints<'tcx>

§

fn with_cached_task<T>(self, task: impl FnOnce() -> T) -> (T, DepNodeIndex)

§

fn mk_tracked<T>( self, data: T, dep_node: DepNodeIndex, ) -> <TyCtxt<'tcx> as Interner>::Tracked<T>
where T: Debug + Clone,

§

fn get_tracked<T>(self, tracked: &<TyCtxt<'tcx> as Interner>::Tracked<T>) -> T
where T: Debug + Clone,

§

fn with_global_cache<R>( self, f: impl FnOnce(&mut GlobalCache<TyCtxt<'tcx>>) -> R, ) -> R

§

fn canonical_param_env_cache_get_or_insert<R>( self, param_env: ParamEnv<'tcx>, f: impl FnOnce() -> CanonicalParamEnvCacheEntry<TyCtxt<'tcx>>, from_entry: impl FnOnce(&CanonicalParamEnvCacheEntry<TyCtxt<'tcx>>) -> R, ) -> R

§

fn assert_evaluation_is_concurrent(&self)

§

fn expand_abstract_consts<T>(self, t: T) -> T
where T: TypeFoldable<TyCtxt<'tcx>>,

§

fn generics_of(self, def_id: DefId) -> &'tcx Generics

§

fn variances_of(self, def_id: DefId) -> &'tcx [Variance]

§

fn opt_alias_variances( self, kind: impl Into<AliasTermKind>, def_id: DefId, ) -> Option<&'tcx [Variance]>

§

fn type_of(self, def_id: DefId) -> EarlyBinder<TyCtxt<'tcx>, Ty<'tcx>>

§

fn type_of_opaque_hir_typeck( self, def_id: LocalDefId, ) -> EarlyBinder<TyCtxt<'tcx>, Ty<'tcx>>

§

fn const_of_item(self, def_id: DefId) -> EarlyBinder<TyCtxt<'tcx>, Const<'tcx>>

§

fn adt_def(self, adt_def_id: DefId) -> AdtDef<'tcx>

§

fn alias_ty_kind(self, alias: AliasTy<TyCtxt<'tcx>>) -> AliasTyKind

§

fn alias_term_kind(self, alias: AliasTerm<TyCtxt<'tcx>>) -> AliasTermKind

§

fn trait_ref_and_own_args_for_alias( self, def_id: DefId, args: &'tcx RawList<(), GenericArg<'tcx>>, ) -> (TraitRef<TyCtxt<'tcx>>, &'tcx [GenericArg<'tcx>])

§

fn mk_args( self, args: &[GenericArg<'tcx>], ) -> &'tcx RawList<(), GenericArg<'tcx>>

§

fn mk_args_from_iter<I, T>( self, args: I, ) -> <T as CollectAndApply<GenericArg<'tcx>, &'tcx RawList<(), GenericArg<'tcx>>>>::Output
where I: Iterator<Item = T>, T: CollectAndApply<GenericArg<'tcx>, &'tcx RawList<(), GenericArg<'tcx>>>,

§

fn check_args_compatible( self, def_id: DefId, args: &'tcx RawList<(), GenericArg<'tcx>>, ) -> bool

§

fn debug_assert_args_compatible( self, def_id: DefId, args: &'tcx RawList<(), GenericArg<'tcx>>, )

§

fn mk_type_list_from_iter<I, T>( self, args: I, ) -> <T as CollectAndApply<Ty<'tcx>, &'tcx RawList<(), Ty<'tcx>>>>::Output
where I: Iterator<Item = T>, T: CollectAndApply<Ty<'tcx>, &'tcx RawList<(), Ty<'tcx>>>,

§

fn parent(self, def_id: DefId) -> DefId

§

fn recursion_limit(self) -> usize

§

fn features(self) -> &'tcx Features

§

fn coroutine_hidden_types( self, def_id: DefId, ) -> EarlyBinder<TyCtxt<'tcx>, Binder<TyCtxt<'tcx>, CoroutineWitnessTypes<TyCtxt<'tcx>>>>

§

fn fn_sig( self, def_id: DefId, ) -> EarlyBinder<TyCtxt<'tcx>, Binder<TyCtxt<'tcx>, FnSig<TyCtxt<'tcx>>>>

§

fn coroutine_movability(self, def_id: DefId) -> Movability

§

fn coroutine_for_closure(self, def_id: DefId) -> DefId

§

fn generics_require_sized_self(self, def_id: DefId) -> bool

§

fn item_bounds( self, def_id: DefId, ) -> EarlyBinder<TyCtxt<'tcx>, impl IntoIterator<Item = Clause<'tcx>>>

§

fn item_self_bounds( self, def_id: DefId, ) -> EarlyBinder<TyCtxt<'tcx>, impl IntoIterator<Item = Clause<'tcx>>>

§

fn item_non_self_bounds( self, def_id: DefId, ) -> EarlyBinder<TyCtxt<'tcx>, impl IntoIterator<Item = Clause<'tcx>>>

§

fn predicates_of( self, def_id: DefId, ) -> EarlyBinder<TyCtxt<'tcx>, impl IntoIterator<Item = Clause<'tcx>>>

§

fn own_predicates_of( self, def_id: DefId, ) -> EarlyBinder<TyCtxt<'tcx>, impl IntoIterator<Item = Clause<'tcx>>>

§

fn explicit_super_predicates_of( self, def_id: DefId, ) -> EarlyBinder<TyCtxt<'tcx>, impl IntoIterator<Item = (Clause<'tcx>, Span)>>

§

fn explicit_implied_predicates_of( self, def_id: DefId, ) -> EarlyBinder<TyCtxt<'tcx>, impl IntoIterator<Item = (Clause<'tcx>, Span)>>

§

fn impl_super_outlives( self, impl_def_id: DefId, ) -> EarlyBinder<TyCtxt<'tcx>, impl IntoIterator<Item = Clause<'tcx>>>

§

fn impl_is_const(self, def_id: DefId) -> bool

§

fn fn_is_const(self, def_id: DefId) -> bool

§

fn alias_has_const_conditions(self, def_id: DefId) -> bool

§

fn const_conditions( self, def_id: DefId, ) -> EarlyBinder<TyCtxt<'tcx>, impl IntoIterator<Item = Binder<TyCtxt<'tcx>, TraitRef<TyCtxt<'tcx>>>>>

§

fn explicit_implied_const_bounds( self, def_id: DefId, ) -> EarlyBinder<TyCtxt<'tcx>, impl IntoIterator<Item = Binder<TyCtxt<'tcx>, TraitRef<TyCtxt<'tcx>>>>>

§

fn impl_self_is_guaranteed_unsized(self, impl_def_id: DefId) -> bool

§

fn has_target_features(self, def_id: DefId) -> bool

§

fn require_lang_item(self, lang_item: SolverLangItem) -> DefId

§

fn require_trait_lang_item(self, lang_item: SolverTraitLangItem) -> DefId

§

fn require_adt_lang_item(self, lang_item: SolverAdtLangItem) -> DefId

§

fn is_lang_item(self, def_id: DefId, lang_item: SolverLangItem) -> bool

§

fn is_trait_lang_item( self, def_id: DefId, lang_item: SolverTraitLangItem, ) -> bool

§

fn is_adt_lang_item(self, def_id: DefId, lang_item: SolverAdtLangItem) -> bool

§

fn is_default_trait(self, def_id: DefId) -> bool

§

fn is_sizedness_trait(self, def_id: DefId) -> bool

§

fn as_lang_item(self, def_id: DefId) -> Option<SolverLangItem>

§

fn as_trait_lang_item(self, def_id: DefId) -> Option<SolverTraitLangItem>

§

fn as_adt_lang_item(self, def_id: DefId) -> Option<SolverAdtLangItem>

§

fn associated_type_def_ids( self, def_id: DefId, ) -> impl IntoIterator<Item = DefId>

§

fn for_each_relevant_impl( self, trait_def_id: DefId, self_ty: Ty<'tcx>, f: impl FnMut(DefId), )

§

fn for_each_blanket_impl(self, trait_def_id: DefId, f: impl FnMut(DefId))

§

fn has_item_definition(self, def_id: DefId) -> bool

§

fn impl_specializes(self, impl_def_id: DefId, victim_def_id: DefId) -> bool

§

fn impl_is_default(self, impl_def_id: DefId) -> bool

§

fn impl_trait_ref( self, impl_def_id: DefId, ) -> EarlyBinder<TyCtxt<'tcx>, TraitRef<TyCtxt<'tcx>>>

§

fn impl_polarity(self, impl_def_id: DefId) -> ImplPolarity

§

fn trait_is_auto(self, trait_def_id: DefId) -> bool

§

fn trait_is_coinductive(self, trait_def_id: DefId) -> bool

§

fn trait_is_alias(self, trait_def_id: DefId) -> bool

§

fn trait_is_dyn_compatible(self, trait_def_id: DefId) -> bool

§

fn trait_is_fundamental(self, def_id: DefId) -> bool

§

fn trait_may_be_implemented_via_object(self, trait_def_id: DefId) -> bool

§

fn trait_is_unsafe(self, trait_def_id: DefId) -> bool

§

fn is_impl_trait_in_trait(self, def_id: DefId) -> bool

§

fn delay_bug(self, msg: impl ToString) -> ErrorGuaranteed

§

fn is_general_coroutine(self, coroutine_def_id: DefId) -> bool

§

fn coroutine_is_async(self, coroutine_def_id: DefId) -> bool

§

fn coroutine_is_gen(self, coroutine_def_id: DefId) -> bool

§

fn coroutine_is_async_gen(self, coroutine_def_id: DefId) -> bool

§

fn unsizing_params_for_adt(self, adt_def_id: DefId) -> &'tcx DenseBitSet<u32>

§

fn anonymize_bound_vars<T>( self, binder: Binder<TyCtxt<'tcx>, T>, ) -> Binder<TyCtxt<'tcx>, T>
where T: TypeFoldable<TyCtxt<'tcx>>,

§

fn opaque_types_defined_by( self, defining_anchor: LocalDefId, ) -> &'tcx RawList<(), LocalDefId>

§

fn opaque_types_and_coroutines_defined_by( self, defining_anchor: LocalDefId, ) -> &'tcx RawList<(), LocalDefId>

§

fn mk_probe(self, probe: Probe<TyCtxt<'tcx>>) -> &'tcx Probe<TyCtxt<'tcx>>

§

fn evaluate_root_goal_for_proof_tree_raw( self, canonical_goal: CanonicalQueryInput<TyCtxt<'tcx>, QueryInput<TyCtxt<'tcx>, Predicate<'tcx>>>, ) -> (Result<Canonical<TyCtxt<'tcx>, Response<TyCtxt<'tcx>>>, NoSolution>, &'tcx Probe<TyCtxt<'tcx>>)

Implementors§