]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: ast: Output union's outer attributes
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Tue, 4 Apr 2023 11:53:34 +0000 (13:53 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:28:43 +0000 (18:28 +0100)
Output a union's outer attributes in a tokenstream.

gcc/rust/ChangeLog:

* ast/rust-ast-tokenstream.cc (TokenStream::visit): Add visitor
to the union's outer attributes.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/ast/rust-ast-tokenstream.cc

index 450767d336c77ad0bb4ad31c906cfc868d57f15b..761e899a06b45203fd4b29adb0de1efca1886f97 100644 (file)
@@ -1952,6 +1952,7 @@ TokenStream::visit (Enum &enumeration)
 void
 TokenStream::visit (Union &union_item)
 {
+  visit_items_as_lines (union_item.get_outer_attrs ());
   auto id = union_item.get_identifier ();
   tokens.push_back (
     Rust::Token::make_identifier (union_item.get_locus (), "union"));