Skip to content

Commit effd520

Browse files
Print after effect in default graphviz formatter
Now the line for each statement will show the diff resulting from the combination of `before_statement_effect` and `statement_effect`. It's still possible to observe each in isolation via `borrowck_graphviz_format = "two_phase"`.
1 parent a29424a commit effd520

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustc_mir/dataflow/generic/graphviz.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ where
418418

419419
self.prev_loc = location;
420420
write!(w, r#"<td {fmt} align="left">"#, fmt = fmt)?;
421-
results.seek_before(location);
421+
results.seek_after(location);
422422
let curr_state = results.get();
423423
write_diff(&mut w, results.analysis(), &self.prev_state, curr_state)?;
424424
self.prev_state.overwrite(curr_state);
@@ -445,7 +445,7 @@ where
445445
A: Analysis<'tcx>,
446446
{
447447
fn column_names(&self) -> &[&str] {
448-
&["ENTRY", " EXIT"]
448+
&["BEFORE", " AFTER"]
449449
}
450450

451451
fn write_state_for_location(
@@ -465,7 +465,7 @@ where
465465

466466
self.prev_loc = location;
467467

468-
// Entry
468+
// Before
469469

470470
write!(w, r#"<td {fmt} align="left">"#, fmt = fmt)?;
471471
results.seek_before(location);
@@ -474,7 +474,7 @@ where
474474
self.prev_state.overwrite(curr_state);
475475
write!(w, "</td>")?;
476476

477-
// Exit
477+
// After
478478

479479
write!(w, r#"<td {fmt} align="left">"#, fmt = fmt)?;
480480
results.seek_after(location);

0 commit comments

Comments
 (0)