Module rustc_typeck::coherence[][src]

🔬 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?

Re-exports

use hir::def_id::DefId;
use hir::def_id::LOCAL_CRATE;
use rustc::traits;
use rustc::ty;
use rustc::ty::TyCtxt;
use rustc::ty::TypeFoldable;
use rustc::ty::query::Providers;
use syntax::ast;

Modules

builtin [
Experimental
]

Check properties that are required by built-in traits and set up data structures required by type-checking/codegen.

inherent_impls [
Experimental
]

The code in this module gathers up all of the inherent impls in the current crate and organizes them in a map. It winds up touching the whole crate and thus must be recomputed completely for any change, but it is very cheap to compute. In practice, most code in the compiler never directly requests this map. Instead, it requests the inherent impls specific to some type (via tcx.inherent_impls(def_id)). That value, however, is computed by selecting an idea from this table.

inherent_impls_overlap [
Experimental
]
orphan [
Experimental
]

Orphan checker: every impl either implements a trait defined in this crate or pertains to a type defined in this crate.

unsafety [
Experimental
]

Unsafety checker: every impl either implements a trait defined in this crate or pertains to a type defined in this crate.

Functions

check_coherence [
Experimental
]
check_impl [
Experimental
]
check_impl_overlap [
Experimental
]

Overlap: No two impls for the same trait are implemented for the same type. Likewise, no two inherent impls for a given type constructor provide a method with the same name.

coherent_trait [
Experimental
]
enforce_trait_manually_implementable [
Experimental
]
provide [
Experimental
]