From ac9003b440d1b677b2002c4d24cf5ce1eb3ec095 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Wed, 28 Jun 2023 14:52:31 +0200 Subject: 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 --- gcc/rust/ast/rust-ast-collector.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc') diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc index 84ebcad..fedff55 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 ()); -- cgit v1.1