diff options
| author | bors <bors@rust-lang.org> | 2014-09-29 17:18:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-09-29 17:18:07 +0000 |
| commit | 1f3cda8bd8496c3b3771b0201d1073ed575321d0 (patch) | |
| tree | 0acaf08d99d544c93df6f688fa96ce40e747588f /src/libsyntax/parse/parser.rs | |
| parent | 5079a10b1e9d87fa0b0d50f1456f920b1ba8323c (diff) | |
| parent | d3e171861f0fd8f3a61ad28d70f675ea9dc712b8 (diff) | |
| download | rust-1f3cda8bd8496c3b3771b0201d1073ed575321d0.tar.gz rust-1f3cda8bd8496c3b3771b0201d1073ed575321d0.zip | |
auto merge of #17629 : alexcrichton/rust/rollup, r=alexcrichton
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(); |
