Module rustc_typeck::coherence::inherent_impls [−][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?
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.
Re-exports
use rustc::dep_graph::DepKind; |
use rustc::hir::def_id::CrateNum; |
use rustc::hir::def_id::DefId; |
use rustc::hir::def_id::LOCAL_CRATE; |
use rustc::hir; |
use rustc::hir::itemlikevisit::ItemLikeVisitor; |
use rustc::ty; |
use rustc::ty::CrateInherentImpls; |
use rustc::ty::TyCtxt; |
use rustc::util::nodemap::DefIdMap; |
use rustc_data_structures::sync::Lrc; |
use syntax::ast; |
use syntax_pos::Span; |
Structs
InherentCollect |
[ Experimental ]
|
Functions
crate_inherent_impls |
[ Experimental ] On-demand query: yields a map containing all types mapped to their inherent impls. |
inherent_impls |
[ Experimental ] On-demand query: yields a vector of the inherent impls for a specific type. |