diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-08-01 12:27:49 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-08-01 12:28:47 -0700 |
| commit | 899400cd1a7465ffcc80d848d6cb2b6fb2436e02 (patch) | |
| tree | 723ae051f92b6c265481525ad340d76129b47fec /src/libsyntax/parse/parser.rs | |
| parent | 300e2b851324bac92c8e0cd21735b5550be51435 (diff) | |
| download | rust-899400cd1a7465ffcc80d848d6cb2b6fb2436e02.tar.gz rust-899400cd1a7465ffcc80d848d6cb2b6fb2436e02.zip | |
libsyntax: Fix a parsing problem with the temporary syntax for by-value pattern match bindings
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 89053c4eb1d..f97ddaf9150 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1693,8 +1693,8 @@ class parser { } } tok { - if !is_ident(tok) || self.is_keyword(~"true") - || self.is_keyword(~"false") { + if (!is_ident(tok) && tok != token::BINOP(token::PLUS)) || + self.is_keyword(~"true") || self.is_keyword(~"false") { let val = self.parse_expr_res(RESTRICT_NO_BAR_OP); if self.eat_keyword(~"to") { let end = self.parse_expr_res(RESTRICT_NO_BAR_OP); |
