Struct rustc_query_impl::plumbing::QueryCtxt
source · [−]Fields
tcx: TyCtxt<'tcx>
queries: &'tcx Queries<'tcx>
Implementations
sourceimpl<'tcx> QueryCtxt<'tcx>
impl<'tcx> QueryCtxt<'tcx>
pub fn from_tcx(tcx: TyCtxt<'tcx>) -> Self
pub(crate) fn on_disk_cache(self) -> Option<&'tcx OnDiskCache<'tcx>>
pub(crate) fn encode_query_results(
self,
encoder: &mut CacheEncoder<'_, 'tcx>,
query_result_index: &mut Vec<(SerializedDepNodeIndex, AbsoluteBytePos)>
)
pub fn try_print_query_stack(
self,
query: Option<QueryJobId>,
handler: &Handler,
num_frames: Option<usize>
) -> usize
Trait Implementations
sourceimpl<'tcx> HasDepContext for QueryCtxt<'tcx>
impl<'tcx> HasDepContext for QueryCtxt<'tcx>
type DepKind = DepKind
type DepContext = TyCtxt<'tcx>
fn dep_context(&self) -> &Self::DepContext
sourceimpl QueryContext for QueryCtxt<'_>
impl QueryContext for QueryCtxt<'_>
sourcefn start_query<R>(
&self,
token: QueryJobId,
diagnostics: Option<&Lock<ThinVec<Diagnostic>>>,
compute: impl FnOnce() -> R
) -> R
fn start_query<R>(
&self,
token: QueryJobId,
diagnostics: Option<&Lock<ThinVec<Diagnostic>>>,
compute: impl FnOnce() -> R
) -> R
Executes a job by changing the ImplicitCtxt
to point to the
new query job while it executes. It returns the diagnostics
captured during execution and the actual result.
fn next_job_id(&self) -> QueryJobId
sourcefn current_query_job(&self) -> Option<QueryJobId>
fn current_query_job(&self) -> Option<QueryJobId>
Get the query information from the TLS context.
fn try_collect_active_jobs(&self) -> Option<QueryMap>
sourcefn load_side_effects(
&self,
prev_dep_node_index: SerializedDepNodeIndex
) -> QuerySideEffects
fn load_side_effects(
&self,
prev_dep_node_index: SerializedDepNodeIndex
) -> QuerySideEffects
Load side effects associated to the node in the previous session.
sourcefn store_side_effects(
&self,
dep_node_index: DepNodeIndex,
side_effects: QuerySideEffects
)
fn store_side_effects(
&self,
dep_node_index: DepNodeIndex,
side_effects: QuerySideEffects
)
Register diagnostics for the given node, for use in next session.
sourcefn store_side_effects_for_anon_node(
&self,
dep_node_index: DepNodeIndex,
side_effects: QuerySideEffects
)
fn store_side_effects_for_anon_node(
&self,
dep_node_index: DepNodeIndex,
side_effects: QuerySideEffects
)
Register diagnostics for the given node, for use in next session.