diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2011-12-20 11:03:21 -0800 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2011-12-21 06:14:35 -0800 |
| commit | 6a901409410fc2fbc6722eb7b352008135252cec (patch) | |
| tree | e44ce0f63bfb27feb95109256f8ec6262b3c45d6 /src/comp/syntax/parse/parser.rs | |
| parent | 1e4de333740690357a8f58883c5c69bf58be1424 (diff) | |
| download | rust-6a901409410fc2fbc6722eb7b352008135252cec.tar.gz rust-6a901409410fc2fbc6722eb7b352008135252cec.zip | |
Make { || ... } sugar for any type of closure, inferred
Diffstat (limited to 'src/comp/syntax/parse/parser.rs')
| -rw-r--r-- | src/comp/syntax/parse/parser.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 43270de4049..0a436a521c9 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -1317,9 +1317,7 @@ fn parse_fn_block_expr(p: parser) -> @ast::expr { let lo = p.get_last_lo_pos(); let decl = parse_fn_block_decl(p); let body = parse_block_tail(p, lo, ast::default_blk); - let _fn = {decl: decl, proto: ast::proto_block, body: body}; - let captures = @{copies: [], moves: []}; - ret mk_expr(p, lo, body.span.hi, ast::expr_fn(_fn, captures)); + ret mk_expr(p, lo, body.span.hi, ast::expr_fn_block(decl, body)); } fn parse_else_expr(p: parser) -> @ast::expr { |
