Fix pretty-printing for empty tuples in MIR.
This commit is contained in:
parent
21b025f55f
commit
b7fa37d03e
1 changed files with 4 additions and 4 deletions
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue