diff options
| author | Scott Lawrence <bytbox@gmail.com> | 2014-01-27 19:03:32 -0500 |
|---|---|---|
| committer | Scott Lawrence <bytbox@gmail.com> | 2014-01-29 09:15:42 -0500 |
| commit | a6867e259b98904d0144904b4ffbba61f7c8f6f9 (patch) | |
| tree | 2ab89dca745fb675f949efaf09467aaec5fe3dec /src/libsyntax/print | |
| parent | 221670b5bc02a9056e3cc278222296f8b3da00de (diff) | |
| download | rust-a6867e259b98904d0144904b4ffbba61f7c8f6f9.tar.gz rust-a6867e259b98904d0144904b4ffbba61f7c8f6f9.zip | |
Removing support for the do syntax from libsyntax and librustc.
Fixes #10815.
Diffstat (limited to 'src/libsyntax/print')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index d3c194b6af6..68efdf31e03 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1088,10 +1088,6 @@ pub fn print_call_pre(s: &mut State, base_args: &mut ~[@ast::Expr]) -> Option<@ast::Expr> { match sugar { - ast::DoSugar => { - head(s, "do"); - Some(base_args.pop().unwrap()) - } ast::ForSugar => { head(s, "for"); Some(base_args.pop().unwrap()) @@ -1111,19 +1107,8 @@ pub fn print_call_post(s: &mut State, } if sugar != ast::NoSugar { nbsp(s); - match blk.unwrap().node { - // need to handle closures specifically - ast::ExprDoBody(e) => { - end(s); // we close our head box; closure - // will create it's own. - print_expr(s, e); - end(s); // close outer box, as closures don't - } - _ => { - // not sure if this can happen. - print_expr(s, blk.unwrap()); - } - } + // not sure if this can happen + print_expr(s, blk.unwrap()); } } @@ -1405,9 +1390,6 @@ pub fn print_expr(s: &mut State, expr: &ast::Expr) { // empty box to satisfy the close. ibox(s, 0); } - ast::ExprDoBody(body) => { - print_expr(s, body); - } ast::ExprBlock(blk) => { // containing cbox, will be closed by print-block at } cbox(s, indent_unit); |
