rustc_query_system::query

Trait QueryContext

Source
pub trait QueryContext: HasDepContext {
    // Required methods
    fn next_job_id(self) -> QueryJobId;
    fn current_query_job(self) -> Option<QueryJobId>;
    fn collect_active_jobs(self) -> QueryMap;
    fn load_side_effects(
        self,
        prev_dep_node_index: SerializedDepNodeIndex,
    ) -> QuerySideEffects;
    fn store_side_effects(
        self,
        dep_node_index: DepNodeIndex,
        side_effects: QuerySideEffects,
    );
    fn store_side_effects_for_anon_node(
        self,
        dep_node_index: DepNodeIndex,
        side_effects: QuerySideEffects,
    );
    fn start_query<R>(
        self,
        token: QueryJobId,
        depth_limit: bool,
        diagnostics: Option<&Lock<ThinVec<DiagInner>>>,
        compute: impl FnOnce() -> R,
    ) -> R;
    fn depth_limit_error(self, job: QueryJobId);
}

Required Methods§

Source

fn next_job_id(self) -> QueryJobId

Source

fn current_query_job(self) -> Option<QueryJobId>

Get the query information from the TLS context.

Source

fn collect_active_jobs(self) -> QueryMap

Source

fn load_side_effects( self, prev_dep_node_index: SerializedDepNodeIndex, ) -> QuerySideEffects

Load side effects associated to the node in the previous session.

Source

fn store_side_effects( self, dep_node_index: DepNodeIndex, side_effects: QuerySideEffects, )

Register diagnostics for the given node, for use in next session.

Source

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.

Source

fn start_query<R>( self, token: QueryJobId, depth_limit: bool, diagnostics: Option<&Lock<ThinVec<DiagInner>>>, 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.

Source

fn depth_limit_error(self, job: QueryJobId)

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.

Implementors§

impl QueryContext for QueryCtxt<'_>