Expand description

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

Structs

Enums

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, returns Some with a suitably-freshened ImplHeader with those types substituted. Otherwise, returns None.
  • Returns whether all impls which would apply to the trait_ref e.g. Ty: Trait<Arg> are already known in the local crate.