diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-07-31 10:36:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-31 10:36:17 +0000 |
commit | 06a65591eb09fbec25e4ee38c1cf751b416af5bf (patch) | |
tree | 398f685ebbab25ab50194d3edc4f725e53a7be87 /gcc | |
parent | f76ddb42f82c04baf6b14aef1b532ccb5a0425bb (diff) | |
parent | 86a46d7973f204085aec8630eb76e3ed35956a85 (diff) | |
download | gcc-06a65591eb09fbec25e4ee38c1cf751b416af5bf.zip gcc-06a65591eb09fbec25e4ee38c1cf751b416af5bf.tar.gz gcc-06a65591eb09fbec25e4ee38c1cf751b416af5bf.tar.bz2 |
Merge #600
600: Use correct lookahead to peek after 'while' token when parsing expression with block (parse_expr_with_block). r=dkm a=asakovets
Co-authored-by: Alexey Sakovets <alexeysakovets@gmail.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/parse/rust-parse-impl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index 340fea7..122a3c3 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -7085,7 +7085,7 @@ Parser<ManagedTokenSource>::parse_expr_with_block (AST::AttrVec outer_attrs) break; case WHILE: { // while or while let, so more lookahead to find out - if (lexer.peek_token ()->get_id () == LET) + if (lexer.peek_token (1)->get_id () == LET) { // while let loop expr expr_parsed = parse_while_let_loop_expr (std::move (outer_attrs)); |