Function rustc_query_system::query::plumbing::ensure_must_run
source · [−]fn ensure_must_run<CTX, K, V>(
tcx: CTX,
key: &K,
query: &QueryVTable<CTX, K, V>
) -> (bool, Option<DepNode<CTX::DepKind>>)where
K: DepNodeParams<CTX::DepContext>,
CTX: QueryContext,
Expand description
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
.
Returns true if the query should still run.
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.