]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Add visibility to trait item
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Thu, 2 Nov 2023 16:10:33 +0000 (17:10 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 30 Jan 2024 11:36:42 +0000 (12:36 +0100)
commitceed844b5284aeabbdfe25ccf099e7ebeeb14a9b
tree0160d43e9040a31a22db5fbb01414c20547654db
parent4c2169d2f4061e72e1e61e9a175d16f7ff50f5c0
gccrs: Add visibility to trait item

The compiler shall parse visibility modifiers on trait items and reject
those at a later stage (ast validation).

gcc/rust/ChangeLog:

* ast/rust-item.h (struct Visibility): Move Visibility from here...
* ast/rust-ast.h (struct Visibility): ...to here.
* parse/rust-parse-impl.h (Parser::parse_trait_item): Parse visibility
before giving it back to the item parsing function.
(Parser::parse_trait_type): Add visibility modifier.
* parse/rust-parse.h (RUST_PARSE_H): Change function prototype.

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