]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Fix parser bug on tupplestruct pattern
authorJakub Dupak <dev@jakubdupak.com>
Thu, 5 Oct 2023 10:10:37 +0000 (12:10 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:04:38 +0000 (19:04 +0100)
gcc/rust/ChangeLog:

* parse/rust-parse-impl.h: Add missing token consumption

Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
gcc/rust/parse/rust-parse-impl.h

index 830845ba656588a2649c50c652cd0ba2fc4d3009..214a7eefda068268648a3bc5e5d66d29e4cffdb9 100644 (file)
@@ -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;