diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-06-28 14:33:36 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:49:33 +0100 |
commit | 92d1a96ddecb8ed40dbcaf8d75892cd7b9eadeea (patch) | |
tree | 5e2dff312bb87fbb9649d5fb38558488014b25b8 /gcc | |
parent | be6fd5da6842eebeb077461ad6ca25d414684be6 (diff) | |
download | gcc-92d1a96ddecb8ed40dbcaf8d75892cd7b9eadeea.zip gcc-92d1a96ddecb8ed40dbcaf8d75892cd7b9eadeea.tar.gz gcc-92d1a96ddecb8ed40dbcaf8d75892cd7b9eadeea.tar.bz2 |
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 <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/ast/rust-ast-collector.cc | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc index f85d194..ffd5311 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 |