Struct chalk_integration::program::Program
source · pub struct Program {Show 33 fields
pub adt_ids: BTreeMap<Identifier, AdtId<ChalkIr>>,
pub adt_kinds: BTreeMap<AdtId<ChalkIr>, TypeKind>,
pub adt_variances: BTreeMap<AdtId<ChalkIr>, Vec<Variance>>,
pub fn_def_ids: BTreeMap<Identifier, FnDefId<ChalkIr>>,
pub fn_def_kinds: BTreeMap<FnDefId<ChalkIr>, TypeKind>,
pub fn_def_variances: BTreeMap<FnDefId<ChalkIr>, Vec<Variance>>,
pub closure_ids: BTreeMap<Identifier, ClosureId<ChalkIr>>,
pub closure_upvars: BTreeMap<ClosureId<ChalkIr>, Binders<Ty<ChalkIr>>>,
pub closure_kinds: BTreeMap<ClosureId<ChalkIr>, TypeKind>,
pub coroutine_ids: BTreeMap<Identifier, CoroutineId<ChalkIr>>,
pub coroutine_kinds: BTreeMap<CoroutineId<ChalkIr>, TypeKind>,
pub coroutine_data: BTreeMap<CoroutineId<ChalkIr>, Arc<CoroutineDatum<ChalkIr>>>,
pub coroutine_witness_data: BTreeMap<CoroutineId<ChalkIr>, Arc<CoroutineWitnessDatum<ChalkIr>>>,
pub trait_ids: BTreeMap<Identifier, TraitId<ChalkIr>>,
pub trait_kinds: BTreeMap<TraitId<ChalkIr>, TypeKind>,
pub adt_data: BTreeMap<AdtId<ChalkIr>, Arc<AdtDatum<ChalkIr>>>,
pub adt_reprs: BTreeMap<AdtId<ChalkIr>, Arc<AdtRepr<ChalkIr>>>,
pub adt_size_aligns: BTreeMap<AdtId<ChalkIr>, Arc<AdtSizeAlign>>,
pub fn_def_data: BTreeMap<FnDefId<ChalkIr>, Arc<FnDefDatum<ChalkIr>>>,
pub closure_inputs_and_output: BTreeMap<ClosureId<ChalkIr>, Binders<FnDefInputsAndOutputDatum<ChalkIr>>>,
pub closure_closure_kind: BTreeMap<ClosureId<ChalkIr>, ClosureKind>,
pub impl_data: BTreeMap<ImplId<ChalkIr>, Arc<ImplDatum<ChalkIr>>>,
pub associated_ty_values: BTreeMap<AssociatedTyValueId<ChalkIr>, Arc<AssociatedTyValue<ChalkIr>>>,
pub opaque_ty_ids: BTreeMap<Identifier, OpaqueTyId<ChalkIr>>,
pub opaque_ty_kinds: BTreeMap<OpaqueTyId<ChalkIr>, TypeKind>,
pub opaque_ty_data: BTreeMap<OpaqueTyId<ChalkIr>, Arc<OpaqueTyDatum<ChalkIr>>>,
pub hidden_opaque_types: BTreeMap<OpaqueTyId<ChalkIr>, Arc<Ty<ChalkIr>>>,
pub trait_data: BTreeMap<TraitId<ChalkIr>, Arc<TraitDatum<ChalkIr>>>,
pub well_known_traits: BTreeMap<WellKnownTrait, TraitId<ChalkIr>>,
pub associated_ty_data: BTreeMap<AssocTypeId<ChalkIr>, Arc<AssociatedTyDatum<ChalkIr>>>,
pub custom_clauses: Vec<ProgramClause<ChalkIr>>,
pub object_safe_traits: HashSet<TraitId<ChalkIr>>,
pub foreign_ty_ids: BTreeMap<Identifier, ForeignDefId<ChalkIr>>,
}
Fields§
§adt_ids: BTreeMap<Identifier, AdtId<ChalkIr>>
From ADT name to item-id. Used during lowering only.
adt_kinds: BTreeMap<AdtId<ChalkIr>, TypeKind>
For each ADT:
adt_variances: BTreeMap<AdtId<ChalkIr>, Vec<Variance>>
§fn_def_ids: BTreeMap<Identifier, FnDefId<ChalkIr>>
§fn_def_kinds: BTreeMap<FnDefId<ChalkIr>, TypeKind>
§fn_def_variances: BTreeMap<FnDefId<ChalkIr>, Vec<Variance>>
§closure_ids: BTreeMap<Identifier, ClosureId<ChalkIr>>
§closure_upvars: BTreeMap<ClosureId<ChalkIr>, Binders<Ty<ChalkIr>>>
§closure_kinds: BTreeMap<ClosureId<ChalkIr>, TypeKind>
§coroutine_ids: BTreeMap<Identifier, CoroutineId<ChalkIr>>
For each coroutine
coroutine_kinds: BTreeMap<CoroutineId<ChalkIr>, TypeKind>
§coroutine_data: BTreeMap<CoroutineId<ChalkIr>, Arc<CoroutineDatum<ChalkIr>>>
§coroutine_witness_data: BTreeMap<CoroutineId<ChalkIr>, Arc<CoroutineWitnessDatum<ChalkIr>>>
§trait_ids: BTreeMap<Identifier, TraitId<ChalkIr>>
From trait name to item-id. Used during lowering only.
trait_kinds: BTreeMap<TraitId<ChalkIr>, TypeKind>
For each trait:
adt_data: BTreeMap<AdtId<ChalkIr>, Arc<AdtDatum<ChalkIr>>>
For each ADT:
adt_reprs: BTreeMap<AdtId<ChalkIr>, Arc<AdtRepr<ChalkIr>>>
§adt_size_aligns: BTreeMap<AdtId<ChalkIr>, Arc<AdtSizeAlign>>
§fn_def_data: BTreeMap<FnDefId<ChalkIr>, Arc<FnDefDatum<ChalkIr>>>
§closure_inputs_and_output: BTreeMap<ClosureId<ChalkIr>, Binders<FnDefInputsAndOutputDatum<ChalkIr>>>
§closure_closure_kind: BTreeMap<ClosureId<ChalkIr>, ClosureKind>
§impl_data: BTreeMap<ImplId<ChalkIr>, Arc<ImplDatum<ChalkIr>>>
For each impl:
associated_ty_values: BTreeMap<AssociatedTyValueId<ChalkIr>, Arc<AssociatedTyValue<ChalkIr>>>
For each associated ty value type Foo = XXX
found in an impl:
opaque_ty_ids: BTreeMap<Identifier, OpaqueTyId<ChalkIr>>
§opaque_ty_kinds: BTreeMap<OpaqueTyId<ChalkIr>, TypeKind>
For each opaque type:
opaque_ty_data: BTreeMap<OpaqueTyId<ChalkIr>, Arc<OpaqueTyDatum<ChalkIr>>>
For each opaque type:
Stores the hidden types for opaque types
trait_data: BTreeMap<TraitId<ChalkIr>, Arc<TraitDatum<ChalkIr>>>
For each trait:
well_known_traits: BTreeMap<WellKnownTrait, TraitId<ChalkIr>>
For each trait lang item
associated_ty_data: BTreeMap<AssocTypeId<ChalkIr>, Arc<AssociatedTyDatum<ChalkIr>>>
For each associated ty declaration type Foo
found in a trait:
custom_clauses: Vec<ProgramClause<ChalkIr>>
For each user-specified clause
object_safe_traits: HashSet<TraitId<ChalkIr>>
Store the traits marked with #[object_safe]
foreign_ty_ids: BTreeMap<Identifier, ForeignDefId<ChalkIr>>
For each foreign type extern { type A; }
Implementations§
Trait Implementations§
source§impl DebugContext for Program
impl DebugContext for Program
fn debug_adt_id( &self, adt_id: AdtId<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_trait_id( &self, trait_id: TraitId<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_assoc_type_id( &self, assoc_type_id: AssocTypeId<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_opaque_ty_id( &self, opaque_ty_id: OpaqueTyId<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_fn_def_id( &self, fn_def_id: FnDefId<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_alias( &self, alias_ty: &AliasTy<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_projection_ty( &self, projection_ty: &ProjectionTy<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_opaque_ty( &self, opaque_ty: &OpaqueTy<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_ty( &self, ty: &Ty<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_lifetime( &self, lifetime: &Lifetime<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_generic_arg( &self, generic_arg: &GenericArg<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_variable_kinds( &self, variable_kinds: &VariableKinds<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_variable_kinds_with_angles( &self, variable_kinds: &VariableKinds<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_canonical_var_kinds( &self, variable_kinds: &CanonicalVarKinds<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_goal( &self, goal: &Goal<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_goals( &self, goals: &Goals<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_program_clause_implication( &self, pci: &ProgramClauseImplication<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_program_clause( &self, clause: &ProgramClause<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_program_clauses( &self, clauses: &ProgramClauses<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_substitution( &self, substitution: &Substitution<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_separator_trait_ref( &self, separator_trait_ref: &SeparatorTraitRef<'_, ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_quantified_where_clauses( &self, clauses: &QuantifiedWhereClauses<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_constraints( &self, constraints: &Constraints<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
fn debug_variances( &self, variances: &Variances<ChalkIr>, fmt: &mut Formatter<'_>, ) -> Result<(), Error>
source§impl PartialEq for Program
impl PartialEq for Program
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 Program
impl UnificationDatabase<ChalkIr> for Program
impl Eq for Program
impl StructuralPartialEq for Program
Auto Trait Implementations§
impl Freeze for Program
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnwindSafe for Program
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: 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> 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.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<DB, I> Split<I> for DB
impl<DB, I> Split<I> for DB
source§fn split_projection<'p>(
&self,
projection: &'p ProjectionTy<I>,
) -> (Arc<AssociatedTyDatum<I>>, &'p [GenericArg<I>], &'p [GenericArg<I>])
fn split_projection<'p>( &self, projection: &'p ProjectionTy<I>, ) -> (Arc<AssociatedTyDatum<I>>, &'p [GenericArg<I>], &'p [GenericArg<I>])
Given a projection of an associated type, split the type
parameters into those that come from the trait and those
that come from the associated type itself. So e.g. if you
have
(Iterator::Item)<F>
, this would return ([F], [])
,
since Iterator::Item
is not generic and hence doesn’t have
any type parameters itself.source§fn trait_parameters_from_projection<'p>(
&self,
projection: &'p ProjectionTy<I>,
) -> &'p [GenericArg<I>]
fn trait_parameters_from_projection<'p>( &self, projection: &'p ProjectionTy<I>, ) -> &'p [GenericArg<I>]
Given a projection
<P0 as Trait<P1..Pn>>::Item<Pn..Pm>
,
returns the trait parameters [P0..Pn]
(see
split_projection
).source§fn trait_ref_from_projection(&self, projection: &ProjectionTy<I>) -> TraitRef<I>
fn trait_ref_from_projection(&self, projection: &ProjectionTy<I>) -> TraitRef<I>
Given a projection
<P0 as Trait<P1..Pn>>::Item<Pn..Pm>
,
returns the trait parameters [P0..Pn]
(see
split_projection
).source§fn split_associated_ty_value_parameters<'p, P>(
&self,
parameters: &'p [P],
associated_ty_value: &AssociatedTyValue<I>,
) -> (&'p [P], &'p [P])
fn split_associated_ty_value_parameters<'p, P>( &self, parameters: &'p [P], associated_ty_value: &AssociatedTyValue<I>, ) -> (&'p [P], &'p [P])
Given the full set of parameters (or binders) for an
associated type value (which appears in an impl), splits
them into the substitutions for the impl and those for the
associated type. Read more
source§fn impl_parameters_and_projection_from_associated_ty_value<'p>(
&self,
parameters: &'p [GenericArg<I>],
associated_ty_value: &AssociatedTyValue<I>,
) -> (&'p [GenericArg<I>], ProjectionTy<I>)
fn impl_parameters_and_projection_from_associated_ty_value<'p>( &self, parameters: &'p [GenericArg<I>], associated_ty_value: &AssociatedTyValue<I>, ) -> (&'p [GenericArg<I>], ProjectionTy<I>)
Given the full set of parameters for an associated type value
(which appears in an impl), returns the trait reference
and projection that are being satisfied by that value. Read more
source§fn split_associated_ty_parameters<'p, P>(
&self,
parameters: &'p [P],
associated_ty_datum: &AssociatedTyDatum<I>,
) -> (&'p [P], &'p [P])
fn split_associated_ty_parameters<'p, P>( &self, parameters: &'p [P], associated_ty_datum: &AssociatedTyDatum<I>, ) -> (&'p [P], &'p [P])
Given the full set of parameters (or binders) for an
associated type datum (the one appearing in a trait), splits
them into the parameters for the trait and those for the
associated type. Read more