From: Pierre-Emmanuel Patry Date: Tue, 4 Apr 2023 10:50:25 +0000 (+0200) Subject: gccrs: ast: Output inner attributes in tokenstreams X-Git-Tag: basepoints/gcc-15~2694 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=44e67ceee62cf08dd2e02886c3379263eb7d64e3;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/rust/ast/rust-ast-tokenstream.cc b/gcc/rust/ast/rust-ast-tokenstream.cc index 4a7107fbbbb9..450767d336c7 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 ())});