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.
- Information pertinent to an overlapping impl error.
- Attempt to fulfill all obligations of
target_implafter unification with
source_trait_ref. If successful, returns a substitution for all the generics of
target_impl, including both those needed to unify with
source_trait_refand those whose identity is determined via a where clause in the impl.
- Query provider for
impl1a specialization of
- Recovers the “impl X for Y” signature from
impl_def_idand returns it as a string.
- Given a subst for the requested impl, translate it to a subst appropriate for the actual item definition (whether it be in that impl, a parent impl, or the trait).
- Like translate_args, but obligations from the parent implementation are registered with the provided