From 55e348280efbaddd9b5b23617cdaa4f04cebefa0 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Mon, 11 Jul 2011 21:06:39 +0200 Subject: [PATCH] Fix pretty-printing of record patterns --- src/comp/syntax/print/pprust.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs index e62b37807f2c..8fb5770e641f 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);