]> git.ipfire.org Git - thirdparty/gcc.git/commit
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)
committerP-E-P <32375388+P-E-P@users.noreply.github.com>
Wed, 12 Jun 2024 09:11:18 +0000 (09:11 +0000)
commit8de769bfc570c2fe6392f54092aaf17b90e22813
tree56fdd89fca8af98340ec1d66466131969c1a9519
parenta45362e582e24f7997edc25dde660297bde710f5
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