diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-07-30 04:22:09 +0200 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-07-30 04:22:09 +0200 |
| commit | f3a3290ba36b66ee091f6442fe7f0a22dc57941b (patch) | |
| tree | 24037cbb4021d0a7c94f972a3031e6d9981f0fe3 /src/libsyntax/parse/parser.rs | |
| parent | 04b88a9eba8abbac87eddcb2998beea09589c2c9 (diff) | |
| download | rust-f3a3290ba36b66ee091f6442fe7f0a22dc57941b.tar.gz rust-f3a3290ba36b66ee091f6442fe7f0a22dc57941b.zip | |
Account for maybe_whole_expr in range patterns.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 6cb965bf817..2fa6d20430b 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -3741,6 +3741,7 @@ impl<'a> Parser<'a> { self.token.is_path_start() // e.g. `MY_CONST`; || self.token == token::Dot // e.g. `.5` for recovery; || self.token.can_begin_literal_or_bool() // e.g. `42`. + || self.token.is_whole_expr() } // Helper function to decide whether to parse as ident binding |
