public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] ast: Output inner attributes in tokenstreams
@ 2023-04-06 21:36 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2023-04-06 21:36 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:1a7f62cd03ca00badfc5cdb5b65e4b6231a921ba

commit 1a7f62cd03ca00badfc5cdb5b65e4b6231a921ba
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Tue Apr 4 12:50:25 2023 +0200

    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 ())});

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-06 21:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-06 21:36 [gcc/devel/rust/master] ast: Output inner attributes in tokenstreams Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).