Skip to content

Commit

Permalink
Fix pretty-printing for empty tuples in MIR.
Browse files Browse the repository at this point in the history
  • Loading branch information
solson committed Jan 6, 2016
1 parent 21b025f commit b7fa37d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librustc/mir/repr.rs
Expand Up @@ -804,10 +804,10 @@ impl<'tcx> Debug for Rvalue<'tcx> {
Vec => write!(fmt, "{:?}", lvs),

Tuple => {
if lvs.len() == 1 {
write!(fmt, "({:?},)", lvs[0])
} else {
fmt_tuple(fmt, "", lvs)
match lvs.len() {
0 => write!(fmt, "()"),
1 => write!(fmt, "({:?},)", lvs[0]),
_ => fmt_tuple(fmt, "", lvs),
}
}

Expand Down

0 comments on commit b7fa37d

Please sign in to comment.