Skip to content

Commit

Permalink
avoid printing 'static
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jul 24, 2017
1 parent 95b0f22 commit 4e1249d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/librustc/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 4e1249d

Please sign in to comment.