diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-06-28 15:25:06 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:49:34 +0100 |
commit | 5672275c701f23f448dde625d3c371560d101a94 (patch) | |
tree | 407787776de728f8b689aa0642761fa1ec9f649a | |
parent | 032b5f90f2d49a751a99c453be496c0233604390 (diff) | |
download | gcc-5672275c701f23f448dde625d3c371560d101a94.zip gcc-5672275c701f23f448dde625d3c371560d101a94.tar.gz gcc-5672275c701f23f448dde625d3c371560d101a94.tar.bz2 |
gccrs: collector: Add where clause to trait impl block
Trait impl block were missing a where clause for their output.
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit): Add where
clause.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
-rw-r--r-- | gcc/rust/ast/rust-ast-collector.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc index 92411ab..7730746 100644 --- a/gcc/rust/ast/rust-ast-collector.cc +++ b/gcc/rust/ast/rust-ast-collector.cc @@ -2151,6 +2151,10 @@ TokenCollector::visit (TraitImpl &impl) visit (impl.get_trait_path ()); push (Rust::Token::make (FOR, Location ())); visit (impl.get_type ()); + + if (impl.has_where_clause ()) + visit (impl.get_where_clause ()); + visit_items_as_block (impl.get_impl_items ()); } |