From 23d13cbcb39b685599a34b37fe25e7a7332d34de Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Wed, 28 Jun 2023 13:10:57 +0200 Subject: collector: Fix trait impl block Trait impl block did not output any generic declaration nor the trait excalamation mark. gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Fix trait impl block output. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/ast/rust-ast-collector.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/rust') diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc index eb34ceb..8fc0f3d 100644 --- a/gcc/rust/ast/rust-ast-collector.cc +++ b/gcc/rust/ast/rust-ast-collector.cc @@ -2144,6 +2144,9 @@ TokenCollector::visit (TraitImpl &impl) { visit_items_as_lines (impl.get_outer_attrs ()); push (Rust::Token::make (IMPL, impl.get_locus ())); + visit (impl.get_generic_params ()); + if (impl.is_exclam ()) + push (Rust::Token::make (EXCLAM, Location ())); visit (impl.get_trait_path ()); push (Rust::Token::make (FOR, Location ())); visit (impl.get_type ()); -- cgit v1.1