aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-06-28 15:25:06 +0200
committerCohenArthur <arthur.cohen@embecosm.com>2023-07-07 13:46:54 +0000
commiteb8f51036aca40ce820f3a778e3187b4d14518dc (patch)
tree6e939988466ed79651a6377f21336f0f11f36c28
parent8b28b320d344768a5dc6287a7f66ac2112d4f2a7 (diff)
downloadgcc-eb8f51036aca40ce820f3a778e3187b4d14518dc.zip
gcc-eb8f51036aca40ce820f3a778e3187b4d14518dc.tar.gz
gcc-eb8f51036aca40ce820f3a778e3187b4d14518dc.tar.bz2
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.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 ());
}