From: Pierre-Emmanuel Patry Date: Wed, 28 Jun 2023 10:43:49 +0000 (+0200) Subject: gccrs: collector: Fix doubled generics X-Git-Tag: basepoints/gcc-15~2391 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=005e4febac01b9e92465e17bc4847e7ef955f0dc;p=thirdparty%2Fgcc.git 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 --- 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 ()));