Module coherence

Module coherence 

Source
Expand description

See Rustc Dev Guide chapters on trait-resolution and trait-specialization for more info on how this works.

StructsΒ§

AmbiguityCausesVisitor πŸ”’
ImplHeader
The β€œheader” of an impl is everything outside the body: a Self type, a trait ref (in the case of a trait impl), and a set of predicates (from the bounds / where-clauses).
OverlapResult
UncoveredTyParams

EnumsΒ§

Conflict
InCrate
Whether we do the orphan check relative to this crate or to some remote crate.
IntersectionHasImpossibleObligations πŸ”’
The result of [fn impl_intersection_has_impossible_obligation].
IsFirstInputType
OrphanCheckErr
OrphanCheckMode
TrackAmbiguityCauses πŸ”’

FunctionsΒ§

add_placeholder_note
compute_intercrate_ambiguity_causes πŸ”’
Compute the intercrate_ambiguity_causes for the new solver using β€œproof trees”.
equate_impl_headers πŸ”’
fresh_impl_header πŸ”’
fresh_impl_header_normalized πŸ”’
impl_intersection_has_impossible_obligation πŸ”’
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.
impl_intersection_has_negative_obligation πŸ”’
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.
orphan_check_trait_ref
Checks whether a trait-ref is potentially implementable by a crate.
overlap πŸ”’
Can both impl a and impl b be satisfied by a common type (including where-clauses)? If so, returns an ImplHeader that unifies the two impls.
overlapping_impls
If there are types that satisfy both impls, returns Some with a suitably-freshened ImplHeader with those types instantiated. Otherwise, returns None.
plug_infer_with_placeholders πŸ”’
search_ambiguity_causes πŸ”’
suggest_increasing_recursion_limit πŸ”’
trait_ref_is_knowable
Returns whether all impls which would apply to the trait_ref e.g. Ty: Trait<Arg> are already known in the local crate.
trait_ref_is_local_or_fundamental
try_prove_negated_where_clause πŸ”’