aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-04-04 12:50:25 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 18:28:43 +0100
commit44e67ceee62cf08dd2e02886c3379263eb7d64e3 (patch)
tree216aeda8cb8fca3b904a315dd356fb2af3bea86b /gcc
parent9d8da7d12642440de699fb744ba6f493194da741 (diff)
downloadgcc-44e67ceee62cf08dd2e02886c3379263eb7d64e3.zip
gcc-44e67ceee62cf08dd2e02886c3379263eb7d64e3.tar.gz
gcc-44e67ceee62cf08dd2e02886c3379263eb7d64e3.tar.bz2
gccrs: ast: Output inner attributes in tokenstreams
Inner attributes were not correctly visited. gcc/rust/ChangeLog: * ast/rust-ast-tokenstream.cc (TokenStream::visit): Add call to inner attribute visitor. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/ast/rust-ast-tokenstream.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast-tokenstream.cc b/gcc/rust/ast/rust-ast-tokenstream.cc
index 4a7107f..450767d 100644
--- a/gcc/rust/ast/rust-ast-tokenstream.cc
+++ b/gcc/rust/ast/rust-ast-tokenstream.cc
@@ -1255,6 +1255,7 @@ TokenStream::visit (BlockExpr &expr)
tokens.push_back (Rust::Token::make (LEFT_CURLY, expr.get_locus ()));
newline ();
increment_indentation ();
+ visit_items_as_lines (expr.get_inner_attrs ());
visit_items_as_lines (expr.get_statements (),
{Rust::Token::make (SEMICOLON, Location ())});