diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2024-05-20 11:02:53 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-17 16:35:31 +0100 |
commit | f092edae96511e92b9d458184b23848f95138ab2 (patch) | |
tree | 3cc9e4e507b6ef03925c86af585ac77877337dd2 /gcc/rust/parse/rust-parse-impl.h | |
parent | bb555badd4eb5d71af45f1056c8e45ad287e70ba (diff) | |
download | gcc-f092edae96511e92b9d458184b23848f95138ab2.zip gcc-f092edae96511e92b9d458184b23848f95138ab2.tar.gz gcc-f092edae96511e92b9d458184b23848f95138ab2.tar.bz2 |
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 <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/parse/rust-parse-impl.h')
-rw-r--r-- | gcc/rust/parse/rust-parse-impl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index d1f5b6b..2c6b3d8 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -3093,9 +3093,9 @@ template <typename EndTokenPred> std::unique_ptr<AST::GenericParam> Parser<ManagedTokenSource>::parse_generic_param (EndTokenPred is_end_token) { - auto token = lexer.peek_token (); auto outer_attrs = parse_outer_attribute (); std::unique_ptr<AST::GenericParam> param; + auto token = lexer.peek_token (); switch (token->get_id ()) { |