Trait rustc_query_impl::keys::Key [−][src]
pub trait Key {
fn query_crate(&self) -> CrateNum;
fn default_span(&self, tcx: TyCtxt<'_>) -> Span;
}Expand description
The Key trait controls what types can legally be used as the key
for a query.
Required methods
fn query_crate(&self) -> CrateNum[src]
fn query_crate(&self) -> CrateNum[src]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[src]
fn default_span(&self, tcx: TyCtxt<'_>) -> Span[src]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
Canonical query goals correspond to abstract trait operations that are not tied to any crate in particular.