diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-06-28 14:52:31 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:49:33 +0100 |
commit | 06594902eb755557a4f2f1cc81dfa901681efed1 (patch) | |
tree | 66c59d8c5b7d44315435011444fdac94ce343ddb /gcc | |
parent | 85201f34877639599c6f53575791d9a6ef66a02b (diff) | |
download | gcc-06594902eb755557a4f2f1cc81dfa901681efed1.zip gcc-06594902eb755557a4f2f1cc81dfa901681efed1.tar.gz gcc-06594902eb755557a4f2f1cc81dfa901681efed1.tar.bz2 |
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 <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/ast/rust-ast-collector.cc | 2 |
1 files changed, 2 insertions, 0 deletions
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 ()); |