We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a60f9ca commit 65f189aCopy full SHA for 65f189a
src/libsyntax/print/pprust.rs
@@ -1553,6 +1553,9 @@ impl<'a> State<'a> {
1553
1554
ast::ExprStruct(ref path, ref fields, ref wth) => {
1555
try!(self.print_path(path, true));
1556
+ if fields.is_empty() && wth.is_none() {
1557
+ return;
1558
+ }
1559
try!(word(&mut self.s, "{"));
1560
try!(self.commasep_cmnt(
1561
Consistent,
@@ -1576,7 +1579,7 @@ impl<'a> State<'a> {
1576
1579
try!(self.print_expr(&**expr));
1577
1580
try!(self.end());
1578
1581
}
- _ => try!(word(&mut self.s, ","))
1582
+ _ => try!(word(&mut self.s, ",")),
1583
1584
try!(word(&mut self.s, "}"));
1585
0 commit comments