Skip to content

Commit

Permalink
rustc: split out the pretty-printing parts of ty::print into a separa…
Browse files Browse the repository at this point in the history
…te module.
  • Loading branch information
eddyb committed Mar 15, 2019
1 parent 26f1807 commit 55871aa
Show file tree
Hide file tree
Showing 4 changed files with 1,324 additions and 1,275 deletions.
4 changes: 2 additions & 2 deletions src/librustc/mir/mod.rs
Expand Up @@ -2370,7 +2370,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {

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

Expand Down

0 comments on commit 55871aa

Please sign in to comment.