diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2011-07-11 21:06:39 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2011-07-11 21:23:49 +0200 |
| commit | 55e348280efbaddd9b5b23617cdaa4f04cebefa0 (patch) | |
| tree | 20332c6fea20e7a0d8107a04ee50a109ee7480a7 /src/comp/syntax | |
| parent | 7340824cbcce104458d87200119b62dbfe0ef07a (diff) | |
| download | rust-55e348280efbaddd9b5b23617cdaa4f04cebefa0.tar.gz rust-55e348280efbaddd9b5b23617cdaa4f04cebefa0.zip | |
Fix pretty-printing of record patterns
Diffstat (limited to 'src/comp/syntax')
| -rw-r--r-- | src/comp/syntax/print/pprust.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs index e62b37807f2..8fb5770e641 100644 --- a/src/comp/syntax/print/pprust.rs +++ b/src/comp/syntax/print/pprust.rs @@ -1121,11 +1121,11 @@ fn print_pat(&ps s, &@ast::pat pat) { } } case (ast::pat_rec(?fields, ?etc)) { - bopen(s); + word(s.s, "{"); fn print_field(&ps s, &ast::field_pat f) { cbox(s, indent_unit); word(s.s, f.ident); - word(s.s, ":"); + word_space(s, ":"); print_pat(s, f.pat); end(s); } @@ -1134,7 +1134,7 @@ fn print_pat(&ps s, &@ast::pat pat) { } commasep_cmnt_ivec(s, consistent, fields, print_field, get_span); if (etc) { space(s.s); word(s.s, "..."); } - bclose(s, pat.span); + word(s.s, "}"); } } s.ann.post(ann_node); |
