[−][src]Module rustc_trait_selection::traits::coherence

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

Structs

OverlapResult

Enums

Conflict
InCrate

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

OrphanCheckErr

Functions

add_placeholder_note
contained_non_local_types

Returns a list of relevant non-local types for ty.

def_id_is_local
fundamental_ty_inner_tys

For #[fundamental] ADTs and &T / &mut T, returns Some with the type parameters of the ADT, or T, respectively. For non-fundamental types, returns None.

orphan_check

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:

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.

overlap_within_probe
overlapping_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.

trait_ref_is_knowable
trait_ref_is_local_or_fundamental
ty_is_local_constructor
with_fresh_ty_vars