From 5672275c701f23f448dde625d3c371560d101a94 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Wed, 28 Jun 2023 15:25:06 +0200 Subject: 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 --- gcc/rust/ast/rust-ast-collector.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc') 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 ()); } -- cgit v1.1