Module rustc_mir_transform::coverage::spans::from_mir
source Β· StructsΒ§
- ExtractedCovspans π
- Hole π
- SpanFromMir π
FunctionsΒ§
- Traverses the MIR body to produce an initial collection of coverage-relevant spans, each associated with a node in the coverage graph (BCB) and possibly other metadata.
- If the MIR
Statementhas a span contributive to computing coverage spans, return it; otherwise returnNone. - If the MIR
Terminatorhas a span contributive to computing coverage spans, return it; otherwise returnNone. - is_closure_like π
- Walks through the expansion ancestors of
original_spanto find a span that is contained inbody_spanand has the sameSyntaxContextasbody_span. The ancestor that was traversed just before the matching span (if any) is also returned. - Returns an extrapolated span (pre-expansion) corresponding to a range within the functionβs body source. This span is guaranteed to be contained within, or equal to, the
body_span. If the extrapolated span is not contained within thebody_span,Noneis returned.