Module rustc_mir::transform::coverage::spans[−][src]

Structs

CoverageSpan

A BCB is deconstructed into one or more Spans. Each Span maps to a CoverageSpan that references the originating BCB and one or more MIR Statements and/or Terminators. Initially, the Spans come from the Statements and Terminators, but subsequent transforms can combine adjacent Spans and CoverageSpan from the same BCB, merging the CoverageStatement vectors, and the Spans to cover the extent of the combined Spans.

CoverageSpans

Converts the initial set of CoverageSpans (one per MIR Statement or Terminator) into a minimal set of CoverageSpans, using the BCB CFG to determine where it is safe and useful to:

Enums

CoverageStatement

Functions

filtered_statement_span

If the MIR Statement has a span contributive to computing coverage spans, return it; otherwise return None.

filtered_terminator_span

If the MIR Terminator has a span contributive to computing coverage spans, return it; otherwise return None.

function_source_span

Returns an extrapolated span (pre-expansion[^1]) 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 the body_span, the body_span is returned.