We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea5dc54 commit 77f4c52Copy full SHA for 77f4c52
src/comp/pretty/pprust.rs
@@ -308,7 +308,7 @@ impure fn print_expr(ps s, @ast.expr expr) {
308
commasep[ast.elt](s, exprs, f);
309
pclose(s);
310
}
311
- case (ast.expr_rec(?fields,_,_)) {
+ case (ast.expr_rec(?fields,?wth,_)) {
312
impure fn print_field(ps s, ast.field field) {
313
hbox(s);
314
if (field.mut == ast.mut) {wrd1(s, "mutable");}
@@ -321,6 +321,16 @@ impure fn print_expr(ps s, @ast.expr expr) {
321
popen(s);
322
auto f = print_field;
323
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
334
335
336
case (ast.expr_call(?func,?args,_)) {
0 commit comments