[][src]Module rustc::traits::coherence

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

See rustc guide chapters on trait-resolution and trait-specialization for more info on how this works.

Structs

OverlapResult [
Experimental
]

Enums

Conflict [
Experimental
]
InCrate [
Experimental
]

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

OrphanCheckErr [
Experimental
]

Functions

def_id_is_local [
Experimental
]
fundamental_ty [
Experimental
]
is_possibly_remote_type [
Experimental
]
orphan_check [
Experimental
]

Checks the coherence orphan rules. impl_def_id should be the def-id of a trait impl. To pass, either the trait must be local, or else two conditions must be satisfied:

orphan_check_trait_ref [
Experimental
]

Check whether a trait-ref is potentially implementable by a crate.

overlap [
Experimental
]

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 [
Experimental
]

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 [
Experimental
]
trait_ref_is_local_or_fundamental [
Experimental
]
ty_is_local [
Experimental
]
ty_is_local_constructor [
Experimental
]
uncovered_tys [
Experimental
]
with_fresh_ty_vars [
Experimental
]