Expand description
Logic and data structures related to impl specialization, explained in greater detail below.
At the moment, this implementation support only the simple “chain” rule: If any two impls overlap, one must be a strict subset of the other.
See the rustc dev guide for a bit more detail on how specialization fits together with the rest of the trait machinery.
Modules§
Structs§
- Overlap
Error - Information pertinent to an overlapping impl error.
Functions§
- fulfill_
implication 🔒 - Attempt to fulfill all obligations of
target_impl
after unification withsource_trait_ref
. If successful, returns the generic parameters for all the generics oftarget_impl
, including both those needed to unify withsource_trait_ref
and those whose identity is determined via a where clause in the impl. - report_
conflicting_ 🔒impls - report_
negative_ 🔒positive_ conflict - report_
overlap_ 🔒conflict - specialization_
enabled_ 🔒in - specialization_
graph_ 🔒provider - Query provider for
specialization_graph_of
. - specializes 🔒
- Is
specializing_impl_def_id
a specialization ofparent_impl_def_id
? - translate_
args - Given the generic parameters for the requested impl, translate it to the generic parameters appropriate for the actual item definition (whether it be in that impl, a parent impl, or the trait).
- translate_
args_ with_ cause - Like translate_args, but obligations from the parent implementation
are registered with the provided
ObligationCause
.