about summary refs log tree commit diff
path: root/src/comp/syntax/parse/parser.rs
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2011-12-20 11:03:21 -0800
committerNiko Matsakis <niko@alum.mit.edu>2011-12-21 06:14:35 -0800
commit6a901409410fc2fbc6722eb7b352008135252cec (patch)
treee44ce0f63bfb27feb95109256f8ec6262b3c45d6 /src/comp/syntax/parse/parser.rs
parent1e4de333740690357a8f58883c5c69bf58be1424 (diff)
downloadrust-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.rs4
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 {