[−][src]Trait rustc_query_system::query::QueryContext

pub trait QueryContext: DepContext {
    type Query: Clone + HashStable<Self::StableHashingContext>;
    fn incremental_verify_ich(&self) -> bool;
fn verbose(&self) -> bool;
fn def_path_str(&self, def_id: DefId) -> String;
fn dep_graph(&self) -> &DepGraph<Self::DepKind>;
fn current_query_job(&self) -> Option<QueryJobId<Self::DepKind>>;
fn try_collect_active_jobs(
        &self
    ) -> Option<FxHashMap<QueryJobId<Self::DepKind>, QueryJobInfo<Self::DepKind, Self::Query>>>;
fn start_query<R>(
        &self,
        token: QueryJobId<Self::DepKind>,
        diagnostics: Option<&Lock<ThinVec<Diagnostic>>>,
        compute: impl FnOnce(Self) -> R
    ) -> R; }

Associated Types

type Query: Clone + HashStable<Self::StableHashingContext>

Loading content...

Required methods

fn incremental_verify_ich(&self) -> bool

fn verbose(&self) -> bool

fn def_path_str(&self, def_id: DefId) -> String

Get string representation from DefPath.

fn dep_graph(&self) -> &DepGraph<Self::DepKind>

Access the DepGraph.

fn current_query_job(&self) -> Option<QueryJobId<Self::DepKind>>

Get the query information from the TLS context.

fn try_collect_active_jobs(
    &self
) -> Option<FxHashMap<QueryJobId<Self::DepKind>, QueryJobInfo<Self::DepKind, Self::Query>>>

fn start_query<R>(
    &self,
    token: QueryJobId<Self::DepKind>,
    diagnostics: Option<&Lock<ThinVec<Diagnostic>>>,
    compute: impl FnOnce(Self) -> 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.

Loading content...

Implementors

Loading content...