diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-01-20 18:36:54 -0800 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-02-09 10:33:06 -0800 |
| commit | effd52078c55c4e585010f6d1a322414c4979da6 (patch) | |
| tree | 6a4ce450888f7341ceb319ce2b7b34e7298765ae | |
| parent | a29424a2265411dda7d7446516ac5fd7499e2b55 (diff) | |
| download | rust-effd52078c55c4e585010f6d1a322414c4979da6.tar.gz rust-effd52078c55c4e585010f6d1a322414c4979da6.zip | |
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"`.
| -rw-r--r-- | src/librustc_mir/dataflow/generic/graphviz.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_mir/dataflow/generic/graphviz.rs b/src/librustc_mir/dataflow/generic/graphviz.rs index fdf86e7b53f..2917807482c 100644 --- a/src/librustc_mir/dataflow/generic/graphviz.rs +++ b/src/librustc_mir/dataflow/generic/graphviz.rs @@ -418,7 +418,7 @@ where self.prev_loc = location; write!(w, r#"<td {fmt} align="left">"#, fmt = fmt)?; - results.seek_before(location); + results.seek_after(location); let curr_state = results.get(); write_diff(&mut w, results.analysis(), &self.prev_state, curr_state)?; self.prev_state.overwrite(curr_state); @@ -445,7 +445,7 @@ where A: Analysis<'tcx>, { fn column_names(&self) -> &[&str] { - &["ENTRY", " EXIT"] + &["BEFORE", " AFTER"] } fn write_state_for_location( @@ -465,7 +465,7 @@ where self.prev_loc = location; - // Entry + // Before write!(w, r#"<td {fmt} align="left">"#, fmt = fmt)?; results.seek_before(location); @@ -474,7 +474,7 @@ where self.prev_state.overwrite(curr_state); write!(w, "</td>")?; - // Exit + // After write!(w, r#"<td {fmt} align="left">"#, fmt = fmt)?; results.seek_after(location); |
