Trait rustc_query_impl::keys::Key[−][src]

pub trait Key {
    fn query_crate(&self) -> CrateNum;
fn default_span(&self, tcx: TyCtxt<'_>) -> Span; }

The Key trait controls what types can legally be used as the key for a query.

Required methods

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]

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?

Loading content...

Implementations on Foreign Types

impl<'tcx> Key for InstanceDef<'tcx>[src]

impl<'tcx> Key for Instance<'tcx>[src]

impl<'tcx> Key for GlobalId<'tcx>[src]

impl<'tcx> Key for LitToConstInput<'tcx>[src]

impl Key for CrateNum[src]

impl Key for LocalDefId[src]

impl Key for DefId[src]

impl Key for WithOptConstParam<LocalDefId>[src]

impl Key for (DefId, DefId)[src]

impl<'tcx> Key for (Instance<'tcx>, LocalDefId)[src]

impl Key for (DefId, LocalDefId)[src]

impl Key for (LocalDefId, DefId)[src]

impl Key for (DefId, Option<Ident>)[src]

impl Key for (DefId, LocalDefId, Ident)[src]

impl Key for (CrateNum, DefId)[src]

impl Key for (DefId, SimplifiedType)[src]

impl<'tcx> Key for SubstsRef<'tcx>[src]

impl<'tcx> Key for (DefId, SubstsRef<'tcx>)[src]

impl<'tcx> Key for ((WithOptConstParam<DefId>, SubstsRef<'tcx>), (WithOptConstParam<DefId>, SubstsRef<'tcx>))[src]

impl<'tcx> Key for (LocalDefId, DefId, SubstsRef<'tcx>)[src]

impl<'tcx> Key for (ParamEnv<'tcx>, PolyTraitRef<'tcx>)[src]

impl<'tcx> Key for (&'tcx Const<'tcx>, Field)[src]

impl<'tcx> Key for ConstAlloc<'tcx>[src]

impl<'tcx> Key for PolyTraitRef<'tcx>[src]

impl<'tcx> Key for GenericArg<'tcx>[src]

impl<'tcx> Key for &'tcx Const<'tcx>[src]

impl<'tcx> Key for Ty<'tcx>[src]

impl<'tcx> Key for &'tcx List<Predicate<'tcx>>[src]

impl<'tcx> Key for ParamEnv<'tcx>[src]

impl<'tcx, T: Key> Key for ParamEnvAnd<'tcx, T>[src]

impl Key for Symbol[src]

impl<'tcx, T> Key for Canonical<'tcx, T>[src]

Canonical query goals correspond to abstract trait operations that are not tied to any crate in particular.

impl Key for (Symbol, u32, u32)[src]

impl<'tcx> Key for (DefId, Ty<'tcx>, SubstsRef<'tcx>, ParamEnv<'tcx>)[src]

Loading content...

Implementors

Loading content...