Skip to main content

coverage_report_with_blockers

Function coverage_report_with_blockers 

Source
pub fn coverage_report_with_blockers(
    program: &MirProgram,
    emit_ctx: &MirEmitCtx<'_>,
) -> (CoverageReport, BTreeMap<&'static str, usize>)
Expand description

Same reach measurement as coverage_report, plus a histogram of the first construct that blocked each HIR-fallback fn.

For every fn the walker can’t emit, first_blocker does the same recursive emit_mir_expr-shaped walk but, instead of building a string, returns a stable label for the first MirExpr variant / MirCallee kind that would have returned None. Counting those labels gives a per-wave roadmap: “lower Match next” reads straight off the dominant bucket. The returned map is keyed by label and ordered (BTreeMap) for deterministic report output.

This is diagnostic-only — it does not touch the production emit path, and the walk is the exact mirror of [emit_mir_expr] so the blocker it names is the one the wired-up backend would hit.