Trait rustc::ty::maps::Key
[−]
[src]
pub trait Key: Clone + Hash + Eq + Debug {
fn map_crate(&self) -> CrateNum;
fn default_span(&self, tcx: TyCtxt) -> Span;
}🔬 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 Key trait controls what types can legally be used as the key
for a query.
Required Methods
fn map_crate(&self) -> CrateNum
🔬 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?
Given an instance of this key, what crate is it referring to? This is used to find the provider.
fn default_span(&self, tcx: TyCtxt) -> Span
🔬 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?
In the event that a cycle occurs, if no explicit span has been
given for a query with key self, what span should we use?
Implementations on Foreign Types
impl Key for (DefId, DefId)[src]
fn map_crate(&self) -> CrateNum[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?
fn default_span(&self, tcx: TyCtxt) -> Span[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?
impl Key for (CrateNum, DefId)[src]
fn map_crate(&self) -> CrateNum[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?
fn default_span(&self, tcx: TyCtxt) -> Span[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?
impl Key for (DefId, SimplifiedType)[src]
fn map_crate(&self) -> CrateNum[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?
fn default_span(&self, tcx: TyCtxt) -> Span[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?
impl<'tcx> Key for (DefId, &'tcx Substs<'tcx>)[src]
fn map_crate(&self) -> CrateNum[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?
fn default_span(&self, tcx: TyCtxt) -> Span[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?
impl<'tcx> Key for (ParamEnv<'tcx>, PolyTraitRef<'tcx>)[src]
fn map_crate(&self) -> CrateNum[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?
fn default_span(&self, tcx: TyCtxt) -> Span[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?
impl Key for InternedString[src]
fn map_crate(&self) -> CrateNum[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?
fn default_span(&self, _tcx: TyCtxt) -> Span[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?
Implementors
impl<'tcx> Key for InstanceDef<'tcx>impl<'tcx> Key for Instance<'tcx>impl Key for CrateNumimpl Key for DefIndeximpl Key for DefIdimpl<'tcx> Key for PolyTraitRef<'tcx>impl<'tcx> Key for Ty<'tcx>impl<'tcx, T: Key> Key for ParamEnvAnd<'tcx, T>