avoid printing 'static

This commit is contained in:
Ralf Jung 2017-07-24 16:32:11 -07:00
parent 95b0f22240
commit 4e1249d75f

View file

@ -1209,10 +1209,13 @@ impl<'tcx> Debug for Rvalue<'tcx> {
};
// When printing regions, add trailing space if necessary.
let region = {
let region = if ppaux::verbose() || ppaux::identify_regions() {
let mut region = format!("{}", region);
if region.len() > 0 { region.push(' '); }
region
} else {
// Do not even print 'static
"".to_owned()
};
write!(fmt, "&{}{}{:?}", region, kind_str, lv)
}