diff options
| author | Haitao Li <lihaitao@gmail.com> | 2011-11-21 23:36:11 +0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-11-22 13:41:17 -0800 |
| commit | a936f78d987debe7cb46a9ec13377cef76645cda (patch) | |
| tree | 2cb78e1bd4868826b810db189c3cae60810d794c /src/comp/syntax/print | |
| parent | 901b9adb69fd55f72e0f71de7725f8aba3b7acb2 (diff) | |
rustc: Allow trailing comma in record fields
Diffstat (limited to 'src/comp/syntax/print')
| -rw-r--r-- | src/comp/syntax/print/pprust.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs index bf87410b885..7da57be4910 100644 --- a/src/comp/syntax/print/pprust.rs +++ b/src/comp/syntax/print/pprust.rs @@ -294,7 +294,7 @@ fn print_type(s: ps, &&ty: @ast::ty) { } fn get_span(f: ast::ty_field) -> codemap::span { ret f.span; } commasep_cmnt(s, consistent, fields, print_field, get_span); - word(s.s, "}"); + word(s.s, ",}"); } ast::ty_tup(elts) { popen(s); @@ -693,7 +693,7 @@ fn print_expr(s: ps, &&expr: @ast::expr) { print_expr(s, expr); end(s); } - _ { } + _ { word(s.s, ","); } } word(s.s, "}"); } |
