Struct rustc::ty::maps::plumbing::JobOwner [−][src]
struct JobOwner<'a, 'tcx: 'a, Q: QueryDescription<'tcx> + 'a> { map: &'a Lock<QueryMap<'tcx, Q>>, key: Q::Key, job: Lrc<QueryJob<'tcx>>, }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
A type representing the responsibility to execute the job in the job
field.
This will poison the relevant query if dropped.
Fields
map: &'a Lock<QueryMap<'tcx, Q>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
key: Q::Key
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
job: Lrc<QueryJob<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Methods
impl<'a, 'tcx, Q: QueryDescription<'tcx>> JobOwner<'a, 'tcx, Q>
[src]
impl<'a, 'tcx, Q: QueryDescription<'tcx>> JobOwner<'a, 'tcx, Q>
fn try_get(
tcx: TyCtxt<'a, 'tcx, '_>,
span: Span,
key: &Q::Key
) -> TryGetJob<'a, 'tcx, Q>
[src]
fn try_get(
tcx: TyCtxt<'a, 'tcx, '_>,
span: Span,
key: &Q::Key
) -> TryGetJob<'a, 'tcx, Q>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Either gets a JobOwner corresponding the the query, allowing us to start executing the query, or it returns with the result of the query. If the query is executing elsewhere, this will wait for it. If the query panicked, this will silently panic.
fn complete(self, result: &Q::Value, dep_node_index: DepNodeIndex)
[src]
fn complete(self, result: &Q::Value, dep_node_index: DepNodeIndex)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Completes the query by updating the query map with the result
,
signals the waiter and forgets the JobOwner, so it won't poison the query
fn start<'lcx, F, R>(
&self,
tcx: TyCtxt<'_, 'tcx, 'lcx>,
compute: F
) -> (R, Vec<Diagnostic>) where
F: for<'b> FnOnce(TyCtxt<'b, 'tcx, 'lcx>) -> R,
[src]
fn start<'lcx, F, R>(
&self,
tcx: TyCtxt<'_, 'tcx, 'lcx>,
compute: F
) -> (R, Vec<Diagnostic>) where
F: for<'b> FnOnce(TyCtxt<'b, 'tcx, 'lcx>) -> R,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
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.
Trait Implementations
impl<'a, 'tcx, Q: QueryDescription<'tcx>> Drop for JobOwner<'a, 'tcx, Q>
[src]
impl<'a, 'tcx, Q: QueryDescription<'tcx>> Drop for JobOwner<'a, 'tcx, Q>