From: Pierre-Emmanuel Patry Date: Wed, 28 Jun 2023 12:52:31 +0000 (+0200) Subject: gccrs: collector: Add generics to external functions X-Git-Tag: basepoints/gcc-15~2384 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06594902eb755557a4f2f1cc81dfa901681efed1;p=thirdparty%2Fgcc.git gccrs: collector: Add generics to external functions Add generic to external functiond declaration collector output. gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Add generics. 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 84ebcad749ae..fedff55ee15f 100644 --- a/gcc/rust/ast/rust-ast-collector.cc +++ b/gcc/rust/ast/rust-ast-collector.cc @@ -2192,6 +2192,8 @@ TokenCollector::visit (ExternalFunctionItem &function) push (Rust::Token::make (FN_TOK, function.get_locus ())); push (Rust::Token::make_identifier (Location (), std::move (id))); + if (function.has_generics ()) + visit (function.get_generic_params ()); push (Rust::Token::make (LEFT_PAREN, Location ())); visit_items_joined_by_separator (function.get_function_params ());