Skip to content

Commit e9067bd

Browse files
committed
MIR dump: restructure pretty to be more extensible by other code
1 parent 49d2274 commit e9067bd

File tree

4 files changed

+246
-133
lines changed

4 files changed

+246
-133
lines changed

src/librustc_mir/borrow_check/nll/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,15 @@ fn dump_mir_results<'a, 'gcx, 'tcx>(
170170
writeln!(out, " | Live variables on entry to {:?}: {}", bb, s)?;
171171
}
172172

173-
PassWhere::InCFG(location) => {
173+
PassWhere::BeforeLocation(location) => {
174174
let s = live_variable_set(
175175
&regular_liveness_per_location[&location],
176176
&drop_liveness_per_location[&location],
177177
);
178178
writeln!(out, " | Live variables at {:?}: {}", location, s)?;
179179
}
180180

181+
PassWhere::AfterLocation(_) |
181182
PassWhere::AfterCFG => {}
182183
}
183184
Ok(())

src/librustc_mir/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
1818

1919
#![feature(box_patterns)]
2020
#![feature(box_syntax)]
21+
#![feature(catch_expr)]
2122
#![feature(conservative_impl_trait)]
2223
#![feature(const_fn)]
2324
#![feature(core_intrinsics)]
2425
#![feature(decl_macro)]
2526
#![feature(i128_type)]
27+
#![feature(inclusive_range_syntax)]
2628
#![feature(match_default_bindings)]
29+
#![feature(range_contains)]
2730
#![feature(rustc_diagnostic_macros)]
2831
#![feature(placement_in_syntax)]
2932
#![feature(collection_placement)]

src/librustc_mir/util/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub mod patch;
1515

1616
mod alignment;
1717
mod graphviz;
18-
mod pretty;
18+
pub(crate) mod pretty;
1919
pub mod liveness;
2020

2121
pub use self::alignment::is_disaligned;

0 commit comments

Comments
 (0)