Module rustc_trait_selection::traits::coherence
source Β· Expand description
See Rustc Dev Guide chapters on trait-resolution and trait-specialization for more info on how this works.
StructsΒ§
EnumsΒ§
- Whether we do the orphan check relative to this crate or to some remote crate.
- The result of [fn impl_intersection_has_impossible_obligation].
- TrackAmbiguityCauses π
FunctionsΒ§
- Compute the
intercrate_ambiguity_causesfor the new solver using βproof treesβ. - equate_impl_headers π
- fresh_impl_header π
- Check if both impls can be satisfied by a common type by considering whether any of either implβs obligations is not known to hold.
- Check if both impls can be satisfied by a common type by considering whether any of first implβs obligations is known not to hold via a negative predicate.
- Checks whether a trait-ref is potentially implementable by a crate.
- overlap πCan both impl
aand implbbe satisfied by a common type (including where-clauses)? If so, returns anImplHeaderthat unifies the two impls. - If there are types that satisfy both impls, returns
Somewith a suitably-freshenedImplHeaderwith those types instantiated. Otherwise, returnsNone. - Returns whether all impls which would apply to the
trait_refe.g.Ty: Trait<Arg>are already known in the local crate.