rustc_query_system::query::job

Function cycle_check

Source
fn cycle_check(
    query_map: &QueryMap,
    query: QueryJobId,
    span: Span,
    stack: &mut Vec<(Span, QueryJobId)>,
    visited: &mut FxHashSet<QueryJobId>,
) -> Option<Option<(QueryJobId, usize)>>
Expand description

Look for query cycles by doing a depth first search starting at query. span is the reason for the query to execute. This is initially DUMMY_SP. If a cycle is detected, this initial value is replaced with the span causing the cycle.