Skip to content

Commit 899400c

Browse files
committed
libsyntax: Fix a parsing problem with the temporary syntax for by-value pattern match bindings
1 parent 300e2b8 commit 899400c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libsyntax/parse/parser.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1693,8 +1693,8 @@ class parser {
16931693
}
16941694
}
16951695
tok {
1696-
if !is_ident(tok) || self.is_keyword(~"true")
1697-
|| self.is_keyword(~"false") {
1696+
if (!is_ident(tok) && tok != token::BINOP(token::PLUS)) ||
1697+
self.is_keyword(~"true") || self.is_keyword(~"false") {
16981698
let val = self.parse_expr_res(RESTRICT_NO_BAR_OP);
16991699
if self.eat_keyword(~"to") {
17001700
let end = self.parse_expr_res(RESTRICT_NO_BAR_OP);

0 commit comments

Comments
 (0)