From 6f15aac219cf2edc59b80d55dd048341db024966 Mon Sep 17 00:00:00 2001 From: Jakub Dupak Date: Thu, 5 Oct 2023 12:10:37 +0200 Subject: [PATCH] gccrs: Fix parser bug on tupplestruct pattern gcc/rust/ChangeLog: * parse/rust-parse-impl.h: Add missing token consumption Signed-off-by: Jakub Dupak --- gcc/rust/parse/rust-parse-impl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index 830845ba6565..214a7eefda06 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -11452,6 +11452,8 @@ Parser::parse_struct_pattern_field_partial ( std::string index_str = t->get_str (); int index = atoi (index_str.c_str ()); + lexer.skip_token (); + if (!skip_token (COLON)) { return nullptr; -- 2.47.2