diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-09-29 08:10:44 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-09-29 08:10:44 -0700 |
| commit | 655b7269c865b8ff446296bdb7640c6ad5c4f965 (patch) | |
| tree | 55edbb8ddab8c9467b667fd44b4cacb255390997 /src/libsyntax/parse/parser.rs | |
| parent | 1ebf456fb02c54fe821f0739da0aba6c25b28c25 (diff) | |
| parent | 2257e231a7e0c455b61c60414a65e89f01cbf509 (diff) | |
| download | rust-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.rs | 6 |
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(); |
