Adds coverage graphviz

This commit is contained in:
Rich Kadel 2020-10-22 20:28:16 -07:00
parent b5020648fe
commit 3291d28e9a
9 changed files with 657 additions and 10 deletions

View file

@ -134,6 +134,14 @@ impl CoverageSpan {
self.bcb == other.bcb
}
pub fn format(&self, tcx: TyCtxt<'tcx>, mir_body: &'a mir::Body<'tcx>) -> String {
format!(
"{}\n {}",
source_range_no_file(tcx, &self.span),
self.format_coverage_statements(tcx, mir_body).replace("\n", "\n "),
)
}
pub fn format_coverage_statements(
&self,
tcx: TyCtxt<'tcx>,