]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: collector: Output outer attributes on blockexpr
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 28 Jun 2023 13:19:51 +0000 (15:19 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:49:33 +0000 (18:49 +0100)
Outer attributes on block expr did not output properly.

gcc/rust/ChangeLog:

* ast/rust-ast-collector.cc (TokenCollector::visit): Add outer
attributes to collector output.

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

index c06605a8c716d48fcb9258e7320e5e16d8027e17..92411ab101a37a8babefad65745b610006c56802 100644 (file)
@@ -1259,6 +1259,7 @@ TokenCollector::visit (ClosureExprInner &expr)
 void
 TokenCollector::visit (BlockExpr &expr)
 {
+  visit_items_as_lines (expr.get_outer_attrs ());
   push (Rust::Token::make (LEFT_CURLY, expr.get_locus ()));
   newline ();
   increment_indentation ();