pub(crate) trait GetQueryVTable<'tcx> {
type Cache: QueryCache + 'tcx;
// Required method
fn query_vtable(tcx: TyCtxt<'tcx>) -> &'tcx QueryVTable<'tcx, Self::Cache>;
}Expand description
Trait that knows how to look up the QueryVTable for a particular query.
This trait allows some per-query code to be defined in generic functions with a trait bound, instead of having to be defined inline within a macro expansion.
There is one macro-generated implementation of this trait for each query,
on the type rustc_query_impl::query_impl::$name::VTableGetter.
Required Associated Types§
type Cache: QueryCache + 'tcx
Required Methods§
fn query_vtable(tcx: TyCtxt<'tcx>) -> &'tcx QueryVTable<'tcx, Self::Cache>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.