[−][src]Function rustc_query_system::query::plumbing::ensure_query_impl
pub(in query::plumbing) fn ensure_query_impl<CTX, C>(
tcx: CTX,
state: &QueryState<CTX::DepKind, CTX::Query, C>,
key: C::Key,
query: &QueryVtable<CTX, C::Key, C::Value>
) where
C: QueryCache,
C::Key: DepNodeParams<CTX>,
CTX: QueryContext,
Ensure that either this query has all green inputs or been executed.
Executing query::ensure(D) is considered a read of the dep-node D.
This function is particularly useful when executing passes for their side-effects -- e.g., in order to report errors for erroneous programs.
Note: The optimization is only available during incr. comp.