From: Pierre-Emmanuel Patry Date: Wed, 28 Jun 2023 13:25:06 +0000 (+0200) Subject: gccrs: collector: Add where clause to trait impl block X-Git-Tag: basepoints/gcc-15~2381 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5672275c701f23f448dde625d3c371560d101a94;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc index 92411ab101a3..7730746a11c8 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 ()); }