From 005e4febac01b9e92465e17bc4847e7ef955f0dc Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Wed, 28 Jun 2023 12:43:49 +0200 Subject: [PATCH] gccrs: collector: Fix doubled generics 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 --- gcc/rust/ast/rust-ast-collector.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc index 99d89737737c..eb34ceb98a8c 100644 --- a/gcc/rust/ast/rust-ast-collector.cc +++ b/gcc/rust/ast/rust-ast-collector.cc @@ -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 ())); -- 2.47.2