diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 64345dc9736..b42c2dbdcc6 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1037,7 +1037,6 @@ fn print_expr(s: ps, &&expr: @ast::expr) { commasep_cmnt(s, consistent, fields, print_field, get_span); match wth { some(expr) => { - if vec::len(fields) > 0u { space(s.s); } ibox(s, indent_unit); word(s.s, ~","); space(s.s); diff --git a/src/test/pretty/record-trailing-comma.rs b/src/test/pretty/record-trailing-comma.rs index a77cc808147..a1dd636491a 100644 --- a/src/test/pretty/record-trailing-comma.rs +++ b/src/test/pretty/record-trailing-comma.rs @@ -3,6 +3,6 @@ type thing = {x: int, y: int,}; fn main() { let sth = {x: 0, y: 1,}; - let sth2 = {y: 9 ..sth}; + let sth2 = {y: 9, ..sth}; assert sth.x + sth2.y == 9; }