]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Add outer attributes to struct expr fields
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Mon, 20 May 2024 13:28:19 +0000 (15:28 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Mon, 17 Mar 2025 15:35:32 +0000 (16:35 +0100)
commitfc1712be9ffde5049cd35aa281a931bc64775b68
tree843f4bbd75c0754539196a65b147208110425c4b
parent997fa94b5276766acb40dd502eb606d5e220e918
gccrs: Add outer attributes to struct expr fields

Struct fields can have outer attributes on their field for various
purpose, this behavior should be reflected upon struct expr fields.

gcc/rust/ChangeLog:

* ast/rust-ast-collector.cc (TokenCollector::visit): Output field
attributes.
* ast/rust-expr.h (class StructExprField): Add outer attributes member.
* parse/rust-parse-impl.h (Parser::parse_struct_expr_field): Parse
outer attributes and store them in the appropriate AST node.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/ast/rust-ast-collector.cc
gcc/rust/ast/rust-expr.h
gcc/rust/parse/rust-parse-impl.h