aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-06-28 15:25:06 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 18:49:34 +0100
commit5672275c701f23f448dde625d3c371560d101a94 (patch)
tree407787776de728f8b689aa0642761fa1ec9f649a /gcc
parent032b5f90f2d49a751a99c453be496c0233604390 (diff)
downloadgcc-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>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/ast/rust-ast-collector.cc4
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 ());
}