Skip to content

Commit 9ff30f1

Browse files
committed
rustc: split out the pretty-printing parts of ty::print into a separate module.
1 parent 05ba29e commit 9ff30f1

File tree

4 files changed

+1313
-1262
lines changed

4 files changed

+1313
-1262
lines changed

src/librustc/mir/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2342,7 +2342,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
23422342

23432343
// When printing regions, add trailing space if necessary.
23442344
let ns = Namespace::ValueNS;
2345-
ty::print::PrintCx::with_tls_tcx(ty::print::FmtPrinter::new(fmt, ns), |cx| {
2345+
ty::print::PrintCx::with_tls_tcx(ty::print::FmtPrinter::new(fmt, ns), |mut cx| {
23462346
let region = if cx.config.is_verbose || cx.config.identify_regions {
23472347
let mut region = region.to_string();
23482348
if region.len() > 0 {
@@ -2353,7 +2353,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
23532353
// Do not even print 'static
23542354
String::new()
23552355
};
2356-
write!(cx.printer.fmt, "&{}{}{:?}", region, kind_str, place)
2356+
write!(cx.printer, "&{}{}{:?}", region, kind_str, place)
23572357
})
23582358
}
23592359

0 commit comments

Comments
 (0)