Skip to content

Commit bab0968

Browse files
authored
Rollup merge of #76313 - richkadel:mir-spanview-2, r=wesleywiser
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 <img width="590" alt="Screen Shot 2020-09-03 at 8 38 08 PM" src="https://user-images.githubusercontent.com/3827298/92202571-25510c00-ee34-11ea-89bc-89eea939476d.png"> <img width="1061" alt="Screen Shot 2020-09-03 at 8 41 04 PM" src="https://user-images.githubusercontent.com/3827298/92202629-49145200-ee34-11ea-8fda-fc6e62c80736.png"> <img width="1113" alt="Screen Shot 2020-09-06 at 5 42 57 PM" src="https://user-images.githubusercontent.com/3827298/92339198-ca085f00-f069-11ea-96d1-c01ced50e2ba.png"> <img width="1692" alt="Screen Shot 2020-09-06 at 5 45 54 PM" src="https://user-images.githubusercontent.com/3827298/92339209-d4c2f400-f069-11ea-94c0-b4d36c200878.png"> r? @tmandry FYI: @wesleywiser
2 parents b4b8a52 + 9046a93 commit bab0968

File tree

7 files changed

+980
-319
lines changed

7 files changed

+980
-319
lines changed

compiler/rustc_mir/src/transform/instrument_coverage.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ impl<'a, 'tcx> Instrumentor<'a, 'tcx> {
309309
for coverage_region in coverage_regions {
310310
span_viewables.push(SpanViewable {
311311
span: coverage_region.span,
312-
title: format!("{}", coverage_region.blocks[0].index()),
312+
id: format!("{}", coverage_region.blocks[0].index()),
313313
tooltip: self.make_tooltip_text(coverage_region),
314314
});
315315
}

0 commit comments

Comments
 (0)