From f092edae96511e92b9d458184b23848f95138ab2 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Mon, 20 May 2024 11:02:53 +0200 Subject: [PATCH] gccrs: 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 --- gcc/rust/parse/rust-parse-impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index d1f5b6bbf0a..2c6b3d80cb2 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 ()) { -- 2.47.2