]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: collector: Fix doubled generics
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 28 Jun 2023 10:43:49 +0000 (12:43 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:49:33 +0000 (18:49 +0100)
Generics were output two times and binding args were missing in
TypePathSegmentGeneric collection.

gcc/rust/ChangeLog:

* ast/rust-ast-collector.cc (TokenCollector::visit): Fix binding
args.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/ast/rust-ast-collector.cc

index 99d89737737cf75f9fe6df08c475649917f3ae2c..eb34ceb98a8c9cb76bc739aafeae13434e90562c 100644 (file)
@@ -631,7 +631,7 @@ TokenCollector::visit (TypePathSegmentGeneric &segment)
     visit_items_joined_by_separator (generic_args, COMMA);
     if (!generic_args.empty () && !binding_args.empty ())
       push (Rust::Token::make (COMMA, Location ()));
-    visit_items_joined_by_separator (generic_args, COMMA);
+    visit_items_joined_by_separator (binding_args, COMMA);
   }
 
   push (Rust::Token::make (RIGHT_ANGLE, Location ()));