From: Pierre-Emmanuel Patry Date: Mon, 20 May 2024 09:02:53 +0000 (+0200) Subject: Fix generic parameter parsing X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50862befdb2c33ad6b71f0c4c8ce3d455c92cffd;p=thirdparty%2Fgcc.git Fix generic parameter parsing Generic parameter parsing failed when an outer attribute was used on it. gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_generic_param): Change token reference to be the last token after all outer attributes have been parsed. Signed-off-by: Pierre-Emmanuel Patry --- diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index e22ad6d3c7c8..b501c8ecc8bd 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -3093,9 +3093,9 @@ template std::unique_ptr Parser::parse_generic_param (EndTokenPred is_end_token) { - auto token = lexer.peek_token (); auto outer_attrs = parse_outer_attribute (); std::unique_ptr param; + auto token = lexer.peek_token (); switch (token->get_id ()) {