Skip to main content

ensure_must_run

Function ensure_must_run 

Source
fn ensure_must_run<'tcx, Q>(
    query: Q,
    qcx: Q::Qcx,
    key: &Q::Key,
    check_cache: bool,
) -> (bool, Option<DepNode>)
where Q: QueryDispatcher<'tcx>,
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.