about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-09-29 08:10:44 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-09-29 08:10:44 -0700
commit655b7269c865b8ff446296bdb7640c6ad5c4f965 (patch)
tree55edbb8ddab8c9467b667fd44b4cacb255390997 /src/libsyntax/parse/parser.rs
parent1ebf456fb02c54fe821f0739da0aba6c25b28c25 (diff)
parent2257e231a7e0c455b61c60414a65e89f01cbf509 (diff)
downloadrust-655b7269c865b8ff446296bdb7640c6ad5c4f965.tar.gz
rust-655b7269c865b8ff446296bdb7640c6ad5c4f965.zip
rollup merge of #17519 : pcwalton/unboxed-closure-move-syntax
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index cbc710821f9..415ff6a4097 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2084,7 +2084,7 @@ impl<'a> Parser<'a> {
                                     ExprBlock(blk));
             },
             token::BINOP(token::OR) |  token::OROR => {
-                return self.parse_lambda_expr(CaptureByValue);
+                return self.parse_lambda_expr(CaptureByRef);
             },
             // FIXME #13626: Should be able to stick in
             // token::SELF_KEYWORD_NAME
@@ -2135,8 +2135,8 @@ impl<'a> Parser<'a> {
                 hi = self.last_span.hi;
             }
             _ => {
-                if self.eat_keyword(keywords::Ref) {
-                    return self.parse_lambda_expr(CaptureByRef);
+                if self.eat_keyword(keywords::Move) {
+                    return self.parse_lambda_expr(CaptureByValue);
                 }
                 if self.eat_keyword(keywords::Proc) {
                     let decl = self.parse_proc_decl();