aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse/rust-parse-impl.h
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-07-31 10:36:17 +0000
committerGitHub <noreply@github.com>2021-07-31 10:36:17 +0000
commit06a65591eb09fbec25e4ee38c1cf751b416af5bf (patch)
tree398f685ebbab25ab50194d3edc4f725e53a7be87 /gcc/rust/parse/rust-parse-impl.h
parentf76ddb42f82c04baf6b14aef1b532ccb5a0425bb (diff)
parent86a46d7973f204085aec8630eb76e3ed35956a85 (diff)
downloadgcc-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/rust/parse/rust-parse-impl.h')
-rw-r--r--gcc/rust/parse/rust-parse-impl.h2
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));