Skip to content

Commit 55e3482

Browse files
committed
Fix pretty-printing of record patterns
1 parent 7340824 commit 55e3482

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/comp/syntax/print/pprust.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,11 +1121,11 @@ fn print_pat(&ps s, &@ast::pat pat) {
11211121
}
11221122
}
11231123
case (ast::pat_rec(?fields, ?etc)) {
1124-
bopen(s);
1124+
word(s.s, "{");
11251125
fn print_field(&ps s, &ast::field_pat f) {
11261126
cbox(s, indent_unit);
11271127
word(s.s, f.ident);
1128-
word(s.s, ":");
1128+
word_space(s, ":");
11291129
print_pat(s, f.pat);
11301130
end(s);
11311131
}
@@ -1134,7 +1134,7 @@ fn print_pat(&ps s, &@ast::pat pat) {
11341134
}
11351135
commasep_cmnt_ivec(s, consistent, fields, print_field, get_span);
11361136
if (etc) { space(s.s); word(s.s, "..."); }
1137-
bclose(s, pat.span);
1137+
word(s.s, "}");
11381138
}
11391139
}
11401140
s.ann.post(ann_node);

0 commit comments

Comments
 (0)