ModulesΒ§
- from_
mir π
StructsΒ§
- Covspan π
FunctionsΒ§
- compare_
spans π - Compares two spans in (lo ascending, hi descending) order.
- discard_
spans_ πoverlapping_ holes - Discard all covspans that overlap a hole.
- ensure_
non_ πempty_ span - extract_
refined_ πcovspans - remove_
unwanted_ πexpansion_ spans - Macros that expand into branches (e.g.
assert!
,trace!
) tend to generate multiple condition/consequent blocks that have the span of the whole macro invocation, which is unhelpful. Keeping only the first such span seems to give better mappings, so remove the others. - remove_
unwanted_ πoverlapping_ spans - Takes a list of sorted spans extracted from MIR, and βrefinesβ those spans by removing spans that overlap in unwanted ways.
- shrink_
visible_ πmacro_ spans - When a span corresponds to a macro invocation that is visible from the
function body, truncate it to just the macro name plus
!
. This seems to give better results for code that uses macros.