Skip to content

Commit 8e8c60c

Browse files
marijnhgraydon
authored andcommitted
---
yaml --- r: 1624 b: refs/heads/master c: 77f4c52 h: refs/heads/master v: v3
1 parent 58d26af commit 8e8c60c

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: ea5dc54c3f0444fd3f20191fa1b1d94372c74c65
2+
refs/heads/master: 77f4c52c3ed5a172cd0c3dbc28f1043dab5cf97d

trunk/src/comp/pretty/pprust.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ impure fn print_expr(ps s, @ast.expr expr) {
308308
commasep[ast.elt](s, exprs, f);
309309
pclose(s);
310310
}
311-
case (ast.expr_rec(?fields,_,_)) {
311+
case (ast.expr_rec(?fields,?wth,_)) {
312312
impure fn print_field(ps s, ast.field field) {
313313
hbox(s);
314314
if (field.mut == ast.mut) {wrd1(s, "mutable");}
@@ -321,6 +321,16 @@ impure fn print_expr(ps s, @ast.expr expr) {
321321
popen(s);
322322
auto f = print_field;
323323
commasep[ast.field](s, fields, f);
324+
alt (wth) {
325+
case (option.some[@ast.expr](?expr)) {
326+
if (_vec.len[ast.field](fields) > 0u) {space(s);}
327+
hbox(s);
328+
wrd1(s, "with");
329+
print_expr(s, expr);
330+
end(s);
331+
}
332+
case (_) {}
333+
}
324334
pclose(s);
325335
}
326336
case (ast.expr_call(?func,?args,_)) {

0 commit comments

Comments
 (0)