Improved the MIR spanview output

* Adds missing "tail" spans (spans that continue beyond the end of
overlapping spans)
* Adds a caret to highlight empty spans associated with MIR elements
that have a position, but otherwise would not be visible.
* Adds visual pointing brackets at the beginning and end of each span
This commit is contained in:
Rich Kadel
2020-09-03 20:31:18 -07:00
parent 4b65872d27
commit 9046a9343b
7 changed files with 983 additions and 322 deletions

View File

@@ -309,7 +309,7 @@ impl<'a, 'tcx> Instrumentor<'a, 'tcx> {
for coverage_region in coverage_regions {
span_viewables.push(SpanViewable {
span: coverage_region.span,
title: format!("{}", coverage_region.blocks[0].index()),
id: format!("{}", coverage_region.blocks[0].index()),
tooltip: self.make_tooltip_text(coverage_region),
});
}