Module rustc_mir_transform::coverage::spans
source · Structs
- A BCB is deconstructed into one or more
Spans. EachSpanmaps to aCoverageSpanthat references the originating BCB and one or more MIRStatements and/orTerminators. Initially, theSpans come from theStatements andTerminators, but subsequent transforms can combine adjacentSpans andCoverageSpanfrom the same BCB, merging theCoverageStatementvectors, and theSpans to cover the extent of the combinedSpans. - Converts the initial set of
CoverageSpans (one per MIRStatementorTerminator) into a minimal set ofCoverageSpans, using the BCB CFG to determine where it is safe and useful to:
Enums
Functions
- 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. - 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, thebody_spanis returned.