Skip to content

Commit 55871aa

Browse files
committed
rustc: split out the pretty-printing parts of ty::print into a separate module.
1 parent 26f1807 commit 55871aa

File tree

4 files changed

+1324
-1275
lines changed

4 files changed

+1324
-1275
lines changed

Diff for: src/librustc/mir/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2370,7 +2370,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
23702370

23712371
// When printing regions, add trailing space if necessary.
23722372
let ns = Namespace::ValueNS;
2373-
ty::print::PrintCx::with_tls_tcx(ty::print::FmtPrinter::new(fmt, ns), |cx| {
2373+
ty::print::PrintCx::with_tls_tcx(ty::print::FmtPrinter::new(fmt, ns), |mut cx| {
23742374
let region = if cx.config.is_verbose || cx.config.identify_regions {
23752375
let mut region = region.to_string();
23762376
if region.len() > 0 {
@@ -2381,7 +2381,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
23812381
// Do not even print 'static
23822382
String::new()
23832383
};
2384-
write!(cx.printer.fmt, "&{}{}{:?}", region, kind_str, place)
2384+
write!(cx.printer, "&{}{}{:?}", region, kind_str, place)
23852385
})
23862386
}
23872387

0 commit comments

Comments
 (0)