Expand description

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

Structs

Enums

InCrate 🔒
Whether we do the orphan check relative to this crate or to some remote crate.

Functions

equate 🔒
Given impl1 and impl2 check if both impls can be satisfied by a common type (including where-clauses) If so, return false, otherwise return true, they are disjoint.
Given impl1 and impl2 check if both impls are never satisfied by a common type (including where-clauses) If so, return true, they are disjoint and false otherwise.
Try to prove that a negative impl exist for the given obligation and its super predicates.
Checks the coherence orphan rules. impl_def_id should be the DefId of a trait impl. To pass, either the trait must be local, or else two conditions must be satisfied:
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.
If there are types that satisfy both impls, invokes on_overlap with a suitably-freshened ImplHeader with those types substituted. Otherwise, invokes no_overlap.