[gcc r14-7445] gccrs: ast: Output inner attributes in tokenstreams
Arthur Cohen
cohenarthur@gcc.gnu.org
Tue Jan 16 17:35:22 GMT 2024
https://gcc.gnu.org/g:44e67ceee62cf08dd2e02886c3379263eb7d64e3
commit r14-7445-g44e67ceee62cf08dd2e02886c3379263eb7d64e3
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date: Tue Apr 4 12:50:25 2023 +0200
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>
Diff:
---
gcc/rust/ast/rust-ast-tokenstream.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/rust/ast/rust-ast-tokenstream.cc b/gcc/rust/ast/rust-ast-tokenstream.cc
index 4a7107fbbbb..450767d336c 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 ())});
More information about the Gcc-cvs
mailing list