[gcc r14-8028] gccrs: Fix parser bug on tupplestruct pattern

Arthur Cohen cohenarthur@gcc.gnu.org
Tue Jan 16 18:14:48 GMT 2024


https://gcc.gnu.org/g:6f15aac219cf2edc59b80d55dd048341db024966

commit r14-8028-g6f15aac219cf2edc59b80d55dd048341db024966
Author: Jakub Dupak <dev@jakubdupak.com>
Date:   Thu Oct 5 12:10:37 2023 +0200

    gccrs: Fix parser bug on tupplestruct pattern
    
    gcc/rust/ChangeLog:
    
            * parse/rust-parse-impl.h: Add missing token consumption
    
    Signed-off-by: Jakub Dupak <dev@jakubdupak.com>

Diff:
---
 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 830845ba656..214a7eefda0 100644
--- a/gcc/rust/parse/rust-parse-impl.h
+++ b/gcc/rust/parse/rust-parse-impl.h
@@ -11452,6 +11452,8 @@ Parser<ManagedTokenSource>::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;


More information about the Gcc-cvs mailing list