Struct chalk_integration::interner::ChalkIr
source · pub struct ChalkIr;Expand description
The default “interner” and the only interner used by chalk itself. In this interner, no interning actually occurs.
Trait Implementations§
source§impl Interner for ChalkIr
impl Interner for ChalkIr
§type InternedType = Arc<TyData<ChalkIr>>
type InternedType = Arc<TyData<ChalkIr>>
“Interned” representation of types. In normal user code,
Self::InternedType is not referenced. Instead, we refer to
Ty<Self>, which wraps this type. Read more§type InternedLifetime = LifetimeData<ChalkIr>
type InternedLifetime = LifetimeData<ChalkIr>
“Interned” representation of lifetimes. In normal user code,
Self::InternedLifetime is not referenced. Instead, we refer to
Lifetime<Self>, which wraps this type. Read more§type InternedConst = Arc<ConstData<ChalkIr>>
type InternedConst = Arc<ConstData<ChalkIr>>
“Interned” representation of const expressions. In normal user code,
Self::InternedConst is not referenced. Instead, we refer to
Const<Self>, which wraps this type. Read more§type InternedConcreteConst = u32
type InternedConcreteConst = u32
“Interned” representation of an evaluated const value.
Self::InternedConcreteConst is not referenced. Instead,
we refer to ConcreteConst<Self>, which wraps this type. Read more§type InternedGenericArg = GenericArgData<ChalkIr>
type InternedGenericArg = GenericArgData<ChalkIr>
“Interned” representation of a “generic parameter”, which can
be either a type or a lifetime. In normal user code,
Self::InternedGenericArg is not referenced. Instead, we refer to
GenericArg<Self>, which wraps this type. Read more§type InternedGoal = Arc<GoalData<ChalkIr>>
type InternedGoal = Arc<GoalData<ChalkIr>>
“Interned” representation of a “goal”. In normal user code,
Self::InternedGoal is not referenced. Instead, we refer to
Goal<Self>, which wraps this type. Read more§type InternedGoals = Vec<Goal<ChalkIr>>
type InternedGoals = Vec<Goal<ChalkIr>>
“Interned” representation of a list of goals. In normal user code,
Self::InternedGoals is not referenced. Instead, we refer to
Goals<Self>, which wraps this type. Read more§type InternedSubstitution = Vec<GenericArg<ChalkIr>>
type InternedSubstitution = Vec<GenericArg<ChalkIr>>
“Interned” representation of a “substitution”. In normal user code,
Self::InternedSubstitution is not referenced. Instead, we refer to
Substitution<Self>, which wraps this type. Read more§type InternedProgramClause = ProgramClauseData<ChalkIr>
type InternedProgramClause = ProgramClauseData<ChalkIr>
“Interned” representation of a “program clause”. In normal user code,
Self::InternedProgramClause is not referenced. Instead, we refer to
ProgramClause<Self>, which wraps this type. Read more§type InternedProgramClauses = Vec<ProgramClause<ChalkIr>>
type InternedProgramClauses = Vec<ProgramClause<ChalkIr>>
“Interned” representation of a list of program clauses. In normal user code,
Self::InternedProgramClauses is not referenced. Instead, we refer to
ProgramClauses<Self>, which wraps this type. Read more§type InternedQuantifiedWhereClauses = Vec<Binders<WhereClause<ChalkIr>>>
type InternedQuantifiedWhereClauses = Vec<Binders<WhereClause<ChalkIr>>>
“Interned” representation of a list of quantified where clauses.
In normal user code,
Self::InternedQuantifiedWhereClauses is not referenced.
Instead, we refer to QuantifiedWhereClauses<Self>, which wraps this type. Read more§type InternedVariableKinds = Vec<VariableKind<ChalkIr>>
type InternedVariableKinds = Vec<VariableKind<ChalkIr>>
“Interned” representation of a list of variable kinds.
In normal user code,
Self::InternedVariableKinds is not referenced.
Instead, we refer to VariableKinds<Self>, which wraps this type. Read more§type InternedCanonicalVarKinds = Vec<WithKind<ChalkIr, UniverseIndex>>
type InternedCanonicalVarKinds = Vec<WithKind<ChalkIr, UniverseIndex>>
“Interned” representation of a list of variable kinds with universe index.
In normal user code,
Self::InternedCanonicalVarKinds is not referenced.
Instead, we refer to CanonicalVarKinds<Self>, which wraps this type. Read more§type InternedConstraints = Vec<InEnvironment<Constraint<ChalkIr>>>
type InternedConstraints = Vec<InEnvironment<Constraint<ChalkIr>>>
“Interned” representation of a list of region constraints.
In normal user code,
Self::InternedConstraints is not referenced.
Instead, we refer to Constraints<Self>, which wraps this type. Read more§type InternedVariances = Vec<Variance>
type InternedVariances = Vec<Variance>
“Interned” representation of a list of
chalk_ir::Variance.
In normal user code, Self::InternedVariances is not referenced.
Instead, we refer to Variances<Self>, which wraps this type. Read more§type InternedAdtId = RawId
type InternedAdtId = RawId
The ID type for ADTs
§type Identifier = Atom<EmptyStaticAtomSet>
type Identifier = Atom<EmptyStaticAtomSet>
Representation of identifiers.
§type FnAbi = ChalkFnAbi
type FnAbi = ChalkFnAbi
Representation of function ABI (e.g. calling convention).
source§fn debug_adt_id(
type_kind_id: AdtId<ChalkIr>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_adt_id( type_kind_id: AdtId<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of a type-kind-id.
Returns
None to fallback to the default debug output.source§fn debug_trait_id(
type_kind_id: TraitId<ChalkIr>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_trait_id( type_kind_id: TraitId<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of a type-kind-id.
Returns
None to fallback to the default debug output (e.g.,
if no info about current program is available from TLS).source§fn debug_assoc_type_id(
id: AssocTypeId<ChalkIr>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_assoc_type_id( id: AssocTypeId<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of a type-kind-id.
Returns
None to fallback to the default debug output.source§fn debug_opaque_ty_id(
id: OpaqueTyId<ChalkIr>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_opaque_ty_id( id: OpaqueTyId<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of an opaque type.
Returns
None to fallback to the default debug output.source§fn debug_fn_def_id(id: FnDefId<Self>, fmt: &mut Formatter<'_>) -> Option<Result>
fn debug_fn_def_id(id: FnDefId<Self>, fmt: &mut Formatter<'_>) -> Option<Result>
Prints the debug representation of a function-def-id.
Returns
None to fallback to the default debug output.source§fn debug_alias(
alias: &AliasTy<ChalkIr>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_alias( alias: &AliasTy<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of an alias. To get good
results, this requires inspecting TLS, and is difficult to
code without reference to a specific interner (and hence
fully known types). Read more
source§fn debug_projection_ty(
proj: &ProjectionTy<ChalkIr>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_projection_ty( proj: &ProjectionTy<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of a ProjectionTy.
Returns
None to fallback to the default debug output.source§fn debug_opaque_ty(
opaque_ty: &OpaqueTy<ChalkIr>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_opaque_ty( opaque_ty: &OpaqueTy<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of an OpaqueTy.
Returns
None to fallback to the default debug output.source§fn debug_ty(ty: &Ty<ChalkIr>, fmt: &mut Formatter<'_>) -> Option<Result>
fn debug_ty(ty: &Ty<ChalkIr>, fmt: &mut Formatter<'_>) -> Option<Result>
Prints the debug representation of a type.
Returns
None to fallback to the default debug output.source§fn debug_lifetime(
lifetime: &Lifetime<ChalkIr>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_lifetime( lifetime: &Lifetime<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of a lifetime.
Returns
None to fallback to the default debug output.source§fn debug_generic_arg(
generic_arg: &GenericArg<ChalkIr>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_generic_arg( generic_arg: &GenericArg<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of an parameter.
Returns
None to fallback to the default debug output.source§fn debug_variable_kinds(
variable_kinds: &VariableKinds<Self>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_variable_kinds( variable_kinds: &VariableKinds<Self>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of a parameter kinds list.
Returns
None to fallback to the default debug output.source§fn debug_variable_kinds_with_angles(
variable_kinds: &VariableKinds<Self>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_variable_kinds_with_angles( variable_kinds: &VariableKinds<Self>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of a parameter kinds list, with angle brackets.
Returns
None to fallback to the default debug output.source§fn debug_canonical_var_kinds(
canonical_var_kinds: &CanonicalVarKinds<Self>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_canonical_var_kinds( canonical_var_kinds: &CanonicalVarKinds<Self>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of an parameter kinds list with universe index.
Returns
None to fallback to the default debug output.source§fn debug_goal(goal: &Goal<ChalkIr>, fmt: &mut Formatter<'_>) -> Option<Result>
fn debug_goal(goal: &Goal<ChalkIr>, fmt: &mut Formatter<'_>) -> Option<Result>
Prints the debug representation of an goal.
Returns
None to fallback to the default debug output.source§fn debug_goals(
goals: &Goals<ChalkIr>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_goals( goals: &Goals<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of a list of goals.
Returns
None to fallback to the default debug output.source§fn debug_program_clause_implication(
pci: &ProgramClauseImplication<ChalkIr>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_program_clause_implication( pci: &ProgramClauseImplication<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of a ProgramClauseImplication.
Returns
None to fallback to the default debug output.source§fn debug_program_clause(
clause: &ProgramClause<ChalkIr>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_program_clause( clause: &ProgramClause<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of a ProgramClause.
Returns
None to fallback to the default debug output.source§fn debug_program_clauses(
clause: &ProgramClauses<ChalkIr>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_program_clauses( clause: &ProgramClauses<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of a ProgramClauses.
Returns
None to fallback to the default debug output.source§fn debug_substitution(
substitution: &Substitution<ChalkIr>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_substitution( substitution: &Substitution<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of a Substitution.
Returns
None to fallback to the default debug output.source§fn debug_separator_trait_ref(
separator_trait_ref: &SeparatorTraitRef<'_, ChalkIr>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_separator_trait_ref( separator_trait_ref: &SeparatorTraitRef<'_, ChalkIr>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of a SeparatorTraitRef.
Returns
None to fallback to the default debug output.source§fn debug_quantified_where_clauses(
clauses: &QuantifiedWhereClauses<Self>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_quantified_where_clauses( clauses: &QuantifiedWhereClauses<Self>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of a QuantifiedWhereClauses.
Returns
None to fallback to the default debug output.source§fn debug_constraints(
constraints: &Constraints<Self>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_constraints( constraints: &Constraints<Self>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of a Constraints.
Returns
None to fallback to the default debug output.source§fn debug_variances(
variances: &Variances<Self>,
fmt: &mut Formatter<'_>,
) -> Option<Result>
fn debug_variances( variances: &Variances<Self>, fmt: &mut Formatter<'_>, ) -> Option<Result>
Prints the debug representation of a Variances.
Returns
None to fallback to the default debug output.source§fn intern_ty(self, kind: TyKind<ChalkIr>) -> Arc<TyData<ChalkIr>>
fn intern_ty(self, kind: TyKind<ChalkIr>) -> Arc<TyData<ChalkIr>>
Create an “interned” type from
ty. This is not normally
invoked directly; instead, you invoke TyKind::intern (which
will ultimately call this method).source§fn ty_data(self, ty: &Arc<TyData<ChalkIr>>) -> &TyData<Self>
fn ty_data(self, ty: &Arc<TyData<ChalkIr>>) -> &TyData<Self>
Lookup the
TyKind from an interned type.source§fn intern_lifetime(
self,
lifetime: LifetimeData<ChalkIr>,
) -> LifetimeData<ChalkIr>
fn intern_lifetime( self, lifetime: LifetimeData<ChalkIr>, ) -> LifetimeData<ChalkIr>
Create an “interned” lifetime from
lifetime. This is not
normally invoked directly; instead, you invoke
LifetimeData::intern (which will ultimately call this
method).source§fn lifetime_data(
self,
lifetime: &LifetimeData<ChalkIr>,
) -> &LifetimeData<ChalkIr>
fn lifetime_data( self, lifetime: &LifetimeData<ChalkIr>, ) -> &LifetimeData<ChalkIr>
Lookup the
LifetimeData that was interned to create a InternedLifetime.source§fn intern_const(self, constant: ConstData<ChalkIr>) -> Arc<ConstData<ChalkIr>>
fn intern_const(self, constant: ConstData<ChalkIr>) -> Arc<ConstData<ChalkIr>>
Create an “interned” const from
const. This is not
normally invoked directly; instead, you invoke
ConstData::intern (which will ultimately call this
method).source§fn const_data(self, constant: &Arc<ConstData<ChalkIr>>) -> &ConstData<ChalkIr>
fn const_data(self, constant: &Arc<ConstData<ChalkIr>>) -> &ConstData<ChalkIr>
Lookup the
ConstData that was interned to create a InternedConst.source§fn const_eq(self, _ty: &Arc<TyData<ChalkIr>>, c1: &u32, c2: &u32) -> bool
fn const_eq(self, _ty: &Arc<TyData<ChalkIr>>, c1: &u32, c2: &u32) -> bool
Determine whether two concrete const values are equal.
source§fn intern_generic_arg(
self,
generic_arg: GenericArgData<ChalkIr>,
) -> GenericArgData<ChalkIr>
fn intern_generic_arg( self, generic_arg: GenericArgData<ChalkIr>, ) -> GenericArgData<ChalkIr>
Create an “interned” parameter from
data. This is not
normally invoked directly; instead, you invoke
GenericArgData::intern (which will ultimately call this
method).source§fn generic_arg_data(
self,
generic_arg: &GenericArgData<ChalkIr>,
) -> &GenericArgData<ChalkIr>
fn generic_arg_data( self, generic_arg: &GenericArgData<ChalkIr>, ) -> &GenericArgData<ChalkIr>
Lookup the
LifetimeData that was interned to create a InternedLifetime.source§fn intern_goal(self, goal: GoalData<ChalkIr>) -> Arc<GoalData<ChalkIr>>
fn intern_goal(self, goal: GoalData<ChalkIr>) -> Arc<GoalData<ChalkIr>>
Create an “interned” goal from
data. This is not
normally invoked directly; instead, you invoke
GoalData::intern (which will ultimately call this
method).source§fn goal_data(self, goal: &Arc<GoalData<ChalkIr>>) -> &GoalData<ChalkIr>
fn goal_data(self, goal: &Arc<GoalData<ChalkIr>>) -> &GoalData<ChalkIr>
Lookup the
GoalData that was interned to create a InternedGoal.source§fn intern_goals<E>(
self,
data: impl IntoIterator<Item = Result<Goal<ChalkIr>, E>>,
) -> Result<Vec<Goal<ChalkIr>>, E>
fn intern_goals<E>( self, data: impl IntoIterator<Item = Result<Goal<ChalkIr>, E>>, ) -> Result<Vec<Goal<ChalkIr>>, E>
Create an “interned” goals from
data. This is not
normally invoked directly; instead, you invoke
GoalsData::intern (which will ultimately call this
method).source§fn goals_data(self, goals: &Vec<Goal<ChalkIr>>) -> &[Goal<ChalkIr>]
fn goals_data(self, goals: &Vec<Goal<ChalkIr>>) -> &[Goal<ChalkIr>]
Lookup the
GoalsData that was interned to create a InternedGoals.source§fn intern_substitution<E>(
self,
data: impl IntoIterator<Item = Result<GenericArg<ChalkIr>, E>>,
) -> Result<Vec<GenericArg<ChalkIr>>, E>
fn intern_substitution<E>( self, data: impl IntoIterator<Item = Result<GenericArg<ChalkIr>, E>>, ) -> Result<Vec<GenericArg<ChalkIr>>, E>
Create an “interned” substitution from
data. This is not
normally invoked directly; instead, you invoke
SubstitutionData::intern (which will ultimately call this
method).source§fn substitution_data(
self,
substitution: &Vec<GenericArg<ChalkIr>>,
) -> &[GenericArg<ChalkIr>]
fn substitution_data( self, substitution: &Vec<GenericArg<ChalkIr>>, ) -> &[GenericArg<ChalkIr>]
Lookup the
SubstitutionData that was interned to create a InternedSubstitution.source§fn intern_program_clause(
self,
data: ProgramClauseData<Self>,
) -> ProgramClauseData<Self>
fn intern_program_clause( self, data: ProgramClauseData<Self>, ) -> ProgramClauseData<Self>
Create an “interned” program clause from
data. This is not
normally invoked directly; instead, you invoke
ProgramClauseData::intern (which will ultimately call this
method).source§fn program_clause_data(
self,
clause: &ProgramClauseData<Self>,
) -> &ProgramClauseData<Self>
fn program_clause_data( self, clause: &ProgramClauseData<Self>, ) -> &ProgramClauseData<Self>
Lookup the
ProgramClauseData that was interned to create a ProgramClause.source§fn intern_program_clauses<E>(
self,
data: impl IntoIterator<Item = Result<ProgramClause<Self>, E>>,
) -> Result<Vec<ProgramClause<Self>>, E>
fn intern_program_clauses<E>( self, data: impl IntoIterator<Item = Result<ProgramClause<Self>, E>>, ) -> Result<Vec<ProgramClause<Self>>, E>
Create an “interned” program clauses from
data. This is not
normally invoked directly; instead, you invoke
ProgramClauses::from_iter (which will ultimately call this
method).source§fn program_clauses_data(
self,
clauses: &Vec<ProgramClause<Self>>,
) -> &[ProgramClause<Self>]
fn program_clauses_data( self, clauses: &Vec<ProgramClause<Self>>, ) -> &[ProgramClause<Self>]
Lookup the
ProgramClauseData that was interned to create a ProgramClause.source§fn intern_quantified_where_clauses<E>(
self,
data: impl IntoIterator<Item = Result<QuantifiedWhereClause<Self>, E>>,
) -> Result<Self::InternedQuantifiedWhereClauses, E>
fn intern_quantified_where_clauses<E>( self, data: impl IntoIterator<Item = Result<QuantifiedWhereClause<Self>, E>>, ) -> Result<Self::InternedQuantifiedWhereClauses, E>
Create an “interned” quantified where clauses from
data. This is not
normally invoked directly; instead, you invoke
QuantifiedWhereClauses::from_iter (which will ultimately call this
method).source§fn quantified_where_clauses_data(
self,
clauses: &Self::InternedQuantifiedWhereClauses,
) -> &[QuantifiedWhereClause<Self>]
fn quantified_where_clauses_data( self, clauses: &Self::InternedQuantifiedWhereClauses, ) -> &[QuantifiedWhereClause<Self>]
Lookup the slice of
QuantifiedWhereClause that was interned to
create a QuantifiedWhereClauses.source§fn intern_generic_arg_kinds<E>(
self,
data: impl IntoIterator<Item = Result<VariableKind<ChalkIr>, E>>,
) -> Result<Self::InternedVariableKinds, E>
fn intern_generic_arg_kinds<E>( self, data: impl IntoIterator<Item = Result<VariableKind<ChalkIr>, E>>, ) -> Result<Self::InternedVariableKinds, E>
Create an “interned” parameter kinds from
data. This is not
normally invoked directly; instead, you invoke
VariableKinds::from_iter (which will ultimately call this
method).source§fn variable_kinds_data(
self,
variable_kinds: &Self::InternedVariableKinds,
) -> &[VariableKind<ChalkIr>]
fn variable_kinds_data( self, variable_kinds: &Self::InternedVariableKinds, ) -> &[VariableKind<ChalkIr>]
Lookup the slice of
VariableKinds that was interned to
create a VariableKinds.source§fn intern_canonical_var_kinds<E>(
self,
data: impl IntoIterator<Item = Result<CanonicalVarKind<ChalkIr>, E>>,
) -> Result<Self::InternedCanonicalVarKinds, E>
fn intern_canonical_var_kinds<E>( self, data: impl IntoIterator<Item = Result<CanonicalVarKind<ChalkIr>, E>>, ) -> Result<Self::InternedCanonicalVarKinds, E>
Create “interned” variable kinds with universe index from
data. This is not
normally invoked directly; instead, you invoke
CanonicalVarKinds::from_iter (which will ultimately call this
method).source§fn canonical_var_kinds_data(
self,
canonical_var_kinds: &Self::InternedCanonicalVarKinds,
) -> &[CanonicalVarKind<ChalkIr>]
fn canonical_var_kinds_data( self, canonical_var_kinds: &Self::InternedCanonicalVarKinds, ) -> &[CanonicalVarKind<ChalkIr>]
Lookup the slice of
CanonicalVariableKind that was interned to
create a CanonicalVariableKinds.source§fn intern_constraints<E>(
self,
data: impl IntoIterator<Item = Result<InEnvironment<Constraint<Self>>, E>>,
) -> Result<Self::InternedConstraints, E>
fn intern_constraints<E>( self, data: impl IntoIterator<Item = Result<InEnvironment<Constraint<Self>>, E>>, ) -> Result<Self::InternedConstraints, E>
Create “interned” constraints from
data. This is not
normally invoked dirctly; instead, you invoke
Constraints::from_iter (which will ultimately call this
method).source§fn constraints_data(
self,
constraints: &Self::InternedConstraints,
) -> &[InEnvironment<Constraint<Self>>]
fn constraints_data( self, constraints: &Self::InternedConstraints, ) -> &[InEnvironment<Constraint<Self>>]
Lookup the slice of
Constraint that was interned to
create a Constraints.source§fn intern_variances<E>(
self,
data: impl IntoIterator<Item = Result<Variance, E>>,
) -> Result<Self::InternedVariances, E>
fn intern_variances<E>( self, data: impl IntoIterator<Item = Result<Variance, E>>, ) -> Result<Self::InternedVariances, E>
Create “interned” variances from
data. This is not
normally invoked directly; instead, you invoke
Variances::from (which will ultimately call this
method).source§fn variances_data(self, variances: &Self::InternedVariances) -> &[Variance]
fn variances_data(self, variances: &Self::InternedVariances) -> &[Variance]
Lookup the slice of
Variance that was interned to
create a Variances.source§fn debug_closure_id(
fn_def_id: ClosureId<Self>,
fmt: &mut Formatter<'_>,
) -> Option<Result<(), Error>>
fn debug_closure_id( fn_def_id: ClosureId<Self>, fmt: &mut Formatter<'_>, ) -> Option<Result<(), Error>>
Prints the debug representation of a closure id.
Returns
None to fallback to the default debug output.source§fn debug_foreign_def_id(
foreign_def_id: ForeignDefId<Self>,
fmt: &mut Formatter<'_>,
) -> Option<Result<(), Error>>
fn debug_foreign_def_id( foreign_def_id: ForeignDefId<Self>, fmt: &mut Formatter<'_>, ) -> Option<Result<(), Error>>
Prints the debug representation of a foreign-def-id.
Returns
None to fallback to the default debug output.source§fn debug_coroutine_id(
coroutine_id: CoroutineId<Self>,
fmt: &mut Formatter<'_>,
) -> Option<Result<(), Error>>
fn debug_coroutine_id( coroutine_id: CoroutineId<Self>, fmt: &mut Formatter<'_>, ) -> Option<Result<(), Error>>
Prints the debug representation of an alias.
Returns
None to fallback to the default debug output.source§impl Ord for ChalkIr
impl Ord for ChalkIr
source§impl PartialEq for ChalkIr
impl PartialEq for ChalkIr
source§impl PartialOrd for ChalkIr
impl PartialOrd for ChalkIr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl RustIrDatabase<ChalkIr> for ChalkDatabase
impl RustIrDatabase<ChalkIr> for ChalkDatabase
source§fn custom_clauses(&self) -> Vec<ProgramClause<ChalkIr>>
fn custom_clauses(&self) -> Vec<ProgramClause<ChalkIr>>
Returns any “custom program clauses” that do not derive from
Rust IR. Used only in testing the underlying solver.
source§fn associated_ty_data(
&self,
ty: AssocTypeId<ChalkIr>,
) -> Arc<AssociatedTyDatum<ChalkIr>>
fn associated_ty_data( &self, ty: AssocTypeId<ChalkIr>, ) -> Arc<AssociatedTyDatum<ChalkIr>>
Returns the datum for the associated type with the given id.
source§fn trait_datum(&self, id: TraitId<ChalkIr>) -> Arc<TraitDatum<ChalkIr>>
fn trait_datum(&self, id: TraitId<ChalkIr>) -> Arc<TraitDatum<ChalkIr>>
Returns the datum for the definition with the given id.
source§fn impl_datum(&self, id: ImplId<ChalkIr>) -> Arc<ImplDatum<ChalkIr>>
fn impl_datum(&self, id: ImplId<ChalkIr>) -> Arc<ImplDatum<ChalkIr>>
Returns the datum for the impl with the given id.
source§fn associated_ty_value(
&self,
id: AssociatedTyValueId<ChalkIr>,
) -> Arc<AssociatedTyValue<ChalkIr>>
fn associated_ty_value( &self, id: AssociatedTyValueId<ChalkIr>, ) -> Arc<AssociatedTyValue<ChalkIr>>
Returns the
AssociatedTyValue with the given id.source§fn opaque_ty_data(&self, id: OpaqueTyId<ChalkIr>) -> Arc<OpaqueTyDatum<ChalkIr>>
fn opaque_ty_data(&self, id: OpaqueTyId<ChalkIr>) -> Arc<OpaqueTyDatum<ChalkIr>>
Returns the
OpaqueTyDatum with the given id.Returns the “hidden type” corresponding with the opaque type.
source§fn adt_datum(&self, id: AdtId<ChalkIr>) -> Arc<AdtDatum<ChalkIr>>
fn adt_datum(&self, id: AdtId<ChalkIr>) -> Arc<AdtDatum<ChalkIr>>
Returns the datum for the ADT with the given id.
source§fn coroutine_datum(
&self,
id: CoroutineId<ChalkIr>,
) -> Arc<CoroutineDatum<ChalkIr>>
fn coroutine_datum( &self, id: CoroutineId<ChalkIr>, ) -> Arc<CoroutineDatum<ChalkIr>>
Returns the coroutine datum for the coroutine with the given id.
source§fn coroutine_witness_datum(
&self,
id: CoroutineId<ChalkIr>,
) -> Arc<CoroutineWitnessDatum<ChalkIr>>
fn coroutine_witness_datum( &self, id: CoroutineId<ChalkIr>, ) -> Arc<CoroutineWitnessDatum<ChalkIr>>
Returns the coroutine witness datum for the coroutine with the given id.
source§fn adt_repr(&self, id: AdtId<ChalkIr>) -> Arc<AdtRepr<ChalkIr>>
fn adt_repr(&self, id: AdtId<ChalkIr>) -> Arc<AdtRepr<ChalkIr>>
Returns the representation for the ADT definition with the given id.
source§fn adt_size_align(&self, id: AdtId<ChalkIr>) -> Arc<AdtSizeAlign>
fn adt_size_align(&self, id: AdtId<ChalkIr>) -> Arc<AdtSizeAlign>
Returns the siza and alignment of the ADT definition with the given id.
source§fn fn_def_datum(&self, id: FnDefId<ChalkIr>) -> Arc<FnDefDatum<ChalkIr>>
fn fn_def_datum(&self, id: FnDefId<ChalkIr>) -> Arc<FnDefDatum<ChalkIr>>
Returns the datum for the fn definition with the given id.
source§fn impls_for_trait(
&self,
trait_id: TraitId<ChalkIr>,
generic_args: &[GenericArg<ChalkIr>],
binders: &CanonicalVarKinds<ChalkIr>,
) -> Vec<ImplId<ChalkIr>>
fn impls_for_trait( &self, trait_id: TraitId<ChalkIr>, generic_args: &[GenericArg<ChalkIr>], binders: &CanonicalVarKinds<ChalkIr>, ) -> Vec<ImplId<ChalkIr>>
Returns a list of potentially relevant impls for a given
trait-id; we also supply the type parameters that we are
trying to match (if known: these parameters may contain
inference variables, for example). The implementor is
permitted to return any superset of the applicable impls;
chalk will narrow down the list to only those that truly
apply. The parameters are provided as a “hint” to help the
implementor do less work, but can be completely ignored if
desired. Read more
source§fn local_impls_to_coherence_check(
&self,
trait_id: TraitId<ChalkIr>,
) -> Vec<ImplId<ChalkIr>>
fn local_impls_to_coherence_check( &self, trait_id: TraitId<ChalkIr>, ) -> Vec<ImplId<ChalkIr>>
Returns the impls that require coherence checking. This is not the
full set of impls that exist: Read more
source§fn impl_provided_for(
&self,
auto_trait_id: TraitId<ChalkIr>,
ty: &TyKind<ChalkIr>,
) -> bool
fn impl_provided_for( &self, auto_trait_id: TraitId<ChalkIr>, ty: &TyKind<ChalkIr>, ) -> bool
Returns true if there is an explicit impl of the auto trait
auto_trait_id for the type ty. This is part of
the auto trait handling – if there is no explicit impl given
by the user for ty, then we provide default impls
(otherwise, we rely on the impls the user gave).source§fn well_known_trait_id(
&self,
well_known_trait: WellKnownTrait,
) -> Option<TraitId<ChalkIr>>
fn well_known_trait_id( &self, well_known_trait: WellKnownTrait, ) -> Option<TraitId<ChalkIr>>
Returns id of a trait lang item, if found
source§fn program_clauses_for_env(
&self,
environment: &Environment<ChalkIr>,
) -> ProgramClauses<ChalkIr>
fn program_clauses_for_env( &self, environment: &Environment<ChalkIr>, ) -> ProgramClauses<ChalkIr>
Calculates program clauses from an env. This is intended to call the
program_clauses_for_env function and then possibly cache the clauses.fn interner(&self) -> ChalkIr
source§fn closure_inputs_and_output(
&self,
closure_id: ClosureId<ChalkIr>,
substs: &Substitution<ChalkIr>,
) -> Binders<FnDefInputsAndOutputDatum<ChalkIr>>
fn closure_inputs_and_output( &self, closure_id: ClosureId<ChalkIr>, substs: &Substitution<ChalkIr>, ) -> Binders<FnDefInputsAndOutputDatum<ChalkIr>>
Gets the inputs and output for a given closure id and substitution. We
pass both the
ClosureId and it’s Substituion to give implementors
the freedom to store associated data in the substitution (like rustc) or
separately (like chalk-integration).source§fn closure_kind(
&self,
closure_id: ClosureId<ChalkIr>,
substs: &Substitution<ChalkIr>,
) -> ClosureKind
fn closure_kind( &self, closure_id: ClosureId<ChalkIr>, substs: &Substitution<ChalkIr>, ) -> ClosureKind
Gets the
ClosureKind for a given closure and substitution.source§fn closure_upvars(
&self,
closure_id: ClosureId<ChalkIr>,
substs: &Substitution<ChalkIr>,
) -> Binders<Ty<ChalkIr>>
fn closure_upvars( &self, closure_id: ClosureId<ChalkIr>, substs: &Substitution<ChalkIr>, ) -> Binders<Ty<ChalkIr>>
Gets the upvars as a
Ty for a given closure id and substitution. There
are no restrictions on the type of upvars.source§fn closure_fn_substitution(
&self,
closure_id: ClosureId<ChalkIr>,
substs: &Substitution<ChalkIr>,
) -> Substitution<ChalkIr>
fn closure_fn_substitution( &self, closure_id: ClosureId<ChalkIr>, substs: &Substitution<ChalkIr>, ) -> Substitution<ChalkIr>
Gets the substitution for the closure when used as a function.
For example, for the following (not-quite-)rust code: Read more
fn unification_database(&self) -> &dyn UnificationDatabase<ChalkIr>
source§fn trait_name(&self, trait_id: TraitId<ChalkIr>) -> String
fn trait_name(&self, trait_id: TraitId<ChalkIr>) -> String
Retrieves a trait’s original name. No uniqueness guarantees, but must
a valid Rust identifier.
source§fn adt_name(&self, struct_id: AdtId<ChalkIr>) -> String
fn adt_name(&self, struct_id: AdtId<ChalkIr>) -> String
Retrieves a struct’s original name. No uniqueness guarantees, but must
a valid Rust identifier.
source§fn assoc_type_name(&self, assoc_ty_id: AssocTypeId<ChalkIr>) -> String
fn assoc_type_name(&self, assoc_ty_id: AssocTypeId<ChalkIr>) -> String
Retrieves the name of an associated type. No uniqueness guarantees, but must
a valid Rust identifier.
source§fn opaque_type_name(&self, opaque_ty_id: OpaqueTyId<ChalkIr>) -> String
fn opaque_type_name(&self, opaque_ty_id: OpaqueTyId<ChalkIr>) -> String
Retrieves the name of an opaque type. No uniqueness guarantees, but must
a valid Rust identifier.
source§fn fn_def_name(&self, fn_def_id: FnDefId<ChalkIr>) -> String
fn fn_def_name(&self, fn_def_id: FnDefId<ChalkIr>) -> String
Retrieves the name of a function definition. No uniqueness guarantees, but must
a valid Rust identifier.
fn discriminant_type(&self, ty: Ty<ChalkIr>) -> Ty<ChalkIr>
source§impl RustIrDatabase<ChalkIr> for Program
impl RustIrDatabase<ChalkIr> for Program
source§fn custom_clauses(&self) -> Vec<ProgramClause<ChalkIr>>
fn custom_clauses(&self) -> Vec<ProgramClause<ChalkIr>>
Returns any “custom program clauses” that do not derive from
Rust IR. Used only in testing the underlying solver.
source§fn associated_ty_data(
&self,
ty: AssocTypeId<ChalkIr>,
) -> Arc<AssociatedTyDatum<ChalkIr>>
fn associated_ty_data( &self, ty: AssocTypeId<ChalkIr>, ) -> Arc<AssociatedTyDatum<ChalkIr>>
Returns the datum for the associated type with the given id.
source§fn trait_datum(&self, id: TraitId<ChalkIr>) -> Arc<TraitDatum<ChalkIr>>
fn trait_datum(&self, id: TraitId<ChalkIr>) -> Arc<TraitDatum<ChalkIr>>
Returns the datum for the definition with the given id.
source§fn impl_datum(&self, id: ImplId<ChalkIr>) -> Arc<ImplDatum<ChalkIr>>
fn impl_datum(&self, id: ImplId<ChalkIr>) -> Arc<ImplDatum<ChalkIr>>
Returns the datum for the impl with the given id.
source§fn associated_ty_value(
&self,
id: AssociatedTyValueId<ChalkIr>,
) -> Arc<AssociatedTyValue<ChalkIr>>
fn associated_ty_value( &self, id: AssociatedTyValueId<ChalkIr>, ) -> Arc<AssociatedTyValue<ChalkIr>>
Returns the
AssociatedTyValue with the given id.source§fn opaque_ty_data(&self, id: OpaqueTyId<ChalkIr>) -> Arc<OpaqueTyDatum<ChalkIr>>
fn opaque_ty_data(&self, id: OpaqueTyId<ChalkIr>) -> Arc<OpaqueTyDatum<ChalkIr>>
Returns the
OpaqueTyDatum with the given id.Returns the “hidden type” corresponding with the opaque type.
source§fn adt_datum(&self, id: AdtId<ChalkIr>) -> Arc<AdtDatum<ChalkIr>>
fn adt_datum(&self, id: AdtId<ChalkIr>) -> Arc<AdtDatum<ChalkIr>>
Returns the datum for the ADT with the given id.
source§fn coroutine_datum(
&self,
id: CoroutineId<ChalkIr>,
) -> Arc<CoroutineDatum<ChalkIr>>
fn coroutine_datum( &self, id: CoroutineId<ChalkIr>, ) -> Arc<CoroutineDatum<ChalkIr>>
Returns the coroutine datum for the coroutine with the given id.
source§fn coroutine_witness_datum(
&self,
id: CoroutineId<ChalkIr>,
) -> Arc<CoroutineWitnessDatum<ChalkIr>>
fn coroutine_witness_datum( &self, id: CoroutineId<ChalkIr>, ) -> Arc<CoroutineWitnessDatum<ChalkIr>>
Returns the coroutine witness datum for the coroutine with the given id.
source§fn adt_repr(&self, id: AdtId<ChalkIr>) -> Arc<AdtRepr<ChalkIr>>
fn adt_repr(&self, id: AdtId<ChalkIr>) -> Arc<AdtRepr<ChalkIr>>
Returns the representation for the ADT definition with the given id.
source§fn adt_size_align(&self, id: AdtId<ChalkIr>) -> Arc<AdtSizeAlign>
fn adt_size_align(&self, id: AdtId<ChalkIr>) -> Arc<AdtSizeAlign>
Returns the siza and alignment of the ADT definition with the given id.
source§fn fn_def_datum(&self, id: FnDefId<ChalkIr>) -> Arc<FnDefDatum<ChalkIr>>
fn fn_def_datum(&self, id: FnDefId<ChalkIr>) -> Arc<FnDefDatum<ChalkIr>>
Returns the datum for the fn definition with the given id.
source§fn impls_for_trait(
&self,
trait_id: TraitId<ChalkIr>,
parameters: &[GenericArg<ChalkIr>],
_binders: &CanonicalVarKinds<ChalkIr>,
) -> Vec<ImplId<ChalkIr>>
fn impls_for_trait( &self, trait_id: TraitId<ChalkIr>, parameters: &[GenericArg<ChalkIr>], _binders: &CanonicalVarKinds<ChalkIr>, ) -> Vec<ImplId<ChalkIr>>
Returns a list of potentially relevant impls for a given
trait-id; we also supply the type parameters that we are
trying to match (if known: these parameters may contain
inference variables, for example). The implementor is
permitted to return any superset of the applicable impls;
chalk will narrow down the list to only those that truly
apply. The parameters are provided as a “hint” to help the
implementor do less work, but can be completely ignored if
desired. Read more
source§fn local_impls_to_coherence_check(
&self,
trait_id: TraitId<ChalkIr>,
) -> Vec<ImplId<ChalkIr>>
fn local_impls_to_coherence_check( &self, trait_id: TraitId<ChalkIr>, ) -> Vec<ImplId<ChalkIr>>
Returns the impls that require coherence checking. This is not the
full set of impls that exist: Read more
source§fn impl_provided_for(
&self,
auto_trait_id: TraitId<ChalkIr>,
impl_ty: &TyKind<ChalkIr>,
) -> bool
fn impl_provided_for( &self, auto_trait_id: TraitId<ChalkIr>, impl_ty: &TyKind<ChalkIr>, ) -> bool
Returns true if there is an explicit impl of the auto trait
auto_trait_id for the type ty. This is part of
the auto trait handling – if there is no explicit impl given
by the user for ty, then we provide default impls
(otherwise, we rely on the impls the user gave).source§fn well_known_trait_id(
&self,
well_known_trait: WellKnownTrait,
) -> Option<TraitId<ChalkIr>>
fn well_known_trait_id( &self, well_known_trait: WellKnownTrait, ) -> Option<TraitId<ChalkIr>>
Returns id of a trait lang item, if found
source§fn program_clauses_for_env(
&self,
environment: &Environment<ChalkIr>,
) -> ProgramClauses<ChalkIr>
fn program_clauses_for_env( &self, environment: &Environment<ChalkIr>, ) -> ProgramClauses<ChalkIr>
Calculates program clauses from an env. This is intended to call the
program_clauses_for_env function and then possibly cache the clauses.fn interner(&self) -> ChalkIr
source§fn closure_inputs_and_output(
&self,
closure_id: ClosureId<ChalkIr>,
_substs: &Substitution<ChalkIr>,
) -> Binders<FnDefInputsAndOutputDatum<ChalkIr>>
fn closure_inputs_and_output( &self, closure_id: ClosureId<ChalkIr>, _substs: &Substitution<ChalkIr>, ) -> Binders<FnDefInputsAndOutputDatum<ChalkIr>>
Gets the inputs and output for a given closure id and substitution. We
pass both the
ClosureId and it’s Substituion to give implementors
the freedom to store associated data in the substitution (like rustc) or
separately (like chalk-integration).source§fn closure_kind(
&self,
closure_id: ClosureId<ChalkIr>,
_substs: &Substitution<ChalkIr>,
) -> ClosureKind
fn closure_kind( &self, closure_id: ClosureId<ChalkIr>, _substs: &Substitution<ChalkIr>, ) -> ClosureKind
Gets the
ClosureKind for a given closure and substitution.source§fn closure_upvars(
&self,
closure_id: ClosureId<ChalkIr>,
_substs: &Substitution<ChalkIr>,
) -> Binders<Ty<ChalkIr>>
fn closure_upvars( &self, closure_id: ClosureId<ChalkIr>, _substs: &Substitution<ChalkIr>, ) -> Binders<Ty<ChalkIr>>
Gets the upvars as a
Ty for a given closure id and substitution. There
are no restrictions on the type of upvars.source§fn closure_fn_substitution(
&self,
_closure_id: ClosureId<ChalkIr>,
substs: &Substitution<ChalkIr>,
) -> Substitution<ChalkIr>
fn closure_fn_substitution( &self, _closure_id: ClosureId<ChalkIr>, substs: &Substitution<ChalkIr>, ) -> Substitution<ChalkIr>
Gets the substitution for the closure when used as a function.
For example, for the following (not-quite-)rust code: Read more
fn unification_database(&self) -> &dyn UnificationDatabase<ChalkIr>
source§fn assoc_type_name(&self, assoc_type_id: AssocTypeId<ChalkIr>) -> String
fn assoc_type_name(&self, assoc_type_id: AssocTypeId<ChalkIr>) -> String
Retrieves the name of an associated type. No uniqueness guarantees, but must
a valid Rust identifier.
fn discriminant_type(&self, ty: Ty<ChalkIr>) -> Ty<ChalkIr>
source§fn trait_name(&self, trait_id: TraitId<I>) -> String
fn trait_name(&self, trait_id: TraitId<I>) -> String
Retrieves a trait’s original name. No uniqueness guarantees, but must
a valid Rust identifier.
source§fn adt_name(&self, adt_id: AdtId<I>) -> String
fn adt_name(&self, adt_id: AdtId<I>) -> String
Retrieves a struct’s original name. No uniqueness guarantees, but must
a valid Rust identifier.
source§fn opaque_type_name(&self, opaque_ty_id: OpaqueTyId<I>) -> String
fn opaque_type_name(&self, opaque_ty_id: OpaqueTyId<I>) -> String
Retrieves the name of an opaque type. No uniqueness guarantees, but must
a valid Rust identifier.
source§fn fn_def_name(&self, fn_def_id: FnDefId<I>) -> String
fn fn_def_name(&self, fn_def_id: FnDefId<I>) -> String
Retrieves the name of a function definition. No uniqueness guarantees, but must
a valid Rust identifier.
source§impl UnificationDatabase<ChalkIr> for ChalkDatabase
impl UnificationDatabase<ChalkIr> for ChalkDatabase
source§impl UnificationDatabase<ChalkIr> for Program
impl UnificationDatabase<ChalkIr> for Program
impl Copy for ChalkIr
impl Eq for ChalkIr
impl StructuralPartialEq for ChalkIr
Auto Trait Implementations§
impl Freeze for ChalkIr
impl RefUnwindSafe for ChalkIr
impl Send for ChalkIr
impl Sync for ChalkIr
impl Unpin for ChalkIr
impl UnwindSafe for ChalkIr
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Cast for T
impl<T> Cast for T
source§fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
Cast a value to type
U using CastTo.source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.