From: Pierre-Emmanuel Patry Date: Wed, 28 Jun 2023 12:33:36 +0000 (+0200) Subject: gccrs: collector: Reformat trait impl X-Git-Tag: basepoints/gcc-15~2386 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92d1a96ddecb8ed40dbcaf8d75892cd7b9eadeea;p=thirdparty%2Fgcc.git gccrs: collector: Reformat trait impl Trait impl were not readable, hence the reformat. gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Reformat trait impl block. 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 f85d194d5c27..ffd5311caa16 100644 --- a/gcc/rust/ast/rust-ast-collector.cc +++ b/gcc/rust/ast/rust-ast-collector.cc @@ -2157,22 +2157,7 @@ TokenCollector::visit (TraitImpl &impl) visit (impl.get_trait_path ()); push (Rust::Token::make (FOR, Location ())); visit (impl.get_type ()); - push (Rust::Token::make (LEFT_CURLY, Location ())); - newline (); - - increment_indentation (); - - for (auto &item : impl.get_impl_items ()) - { - indentation (); - visit (item); - } - - decrement_indentation (); - newline (); - - push (Rust::Token::make (RIGHT_CURLY, Location ())); - newline (); + visit_items_as_block (impl.get_impl_items ()); } void