aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-06-28 15:19:51 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 18:49:33 +0100
commit032b5f90f2d49a751a99c453be496c0233604390 (patch)
treeb9fb2b83aa484fe43b9edf8883d69732f1d56e67
parentd862c1bbcf407135cfe481bca7c41c2a48af32db (diff)
downloadgcc-032b5f90f2d49a751a99c453be496c0233604390.zip
gcc-032b5f90f2d49a751a99c453be496c0233604390.tar.gz
gcc-032b5f90f2d49a751a99c453be496c0233604390.tar.bz2
gccrs: collector: Output outer attributes on blockexpr
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>
-rw-r--r--gcc/rust/ast/rust-ast-collector.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc
index c06605a..92411ab 100644
--- a/gcc/rust/ast/rust-ast-collector.cc
+++ b/gcc/rust/ast/rust-ast-collector.cc
@@ -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 ();