Fix printing regions with -Z verbose

This commit is contained in:
Ralf Jung 2017-07-24 13:43:05 -07:00
parent b80e946101
commit 95b0f22240

View File

@ -1208,14 +1208,11 @@ impl<'tcx> Debug for Rvalue<'tcx> {
BorrowKind::Mut | BorrowKind::Unique => "mut ",
};
// When identifying regions, add trailing space if
// necessary.
let region = if ppaux::identify_regions() {
// When printing regions, add trailing space if necessary.
let region = {
let mut region = format!("{}", region);
if region.len() > 0 { region.push(' '); }
region
} else {
"".to_owned()
};
write!(fmt, "&{}{}{:?}", region, kind_str, lv)
}