public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #1111
@ 2022-06-08 12:31 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 12:31 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:497ee70b776574aa3559c7d49a5cc7cf359d320e
commit 497ee70b776574aa3559c7d49a5cc7cf359d320e
Merge: c1639be8bb0 03cb435c190
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date: Wed Apr 13 10:41:12 2022 +0000
Merge #1111
1111: Add AST Private Visibilities r=CohenArthur a=CohenArthur
When parsing a visibility in `parse_visibility`, it is not an error to
not have a pub token: It simply means we want to create a private
visibility. If we had C++14 or another language, we could instead
represent all visibilities as an optional<AST::Visibility> where the
Visibility class would not need to change. But I think the best course
of action for our case is to instead keep visibilities even when they
are private and have a special case in the `VisKind` enumeration.
This also enables HIR lowering of visibilities to be performed properly for private items
Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Diff:
gcc/rust/ast/rust-ast-full-test.cc | 14 ++++++-----
gcc/rust/ast/rust-item.h | 51 ++++++++++++++++++++++----------------
gcc/rust/hir/rust-ast-lower.cc | 15 +++++------
gcc/rust/parse/rust-parse-impl.h | 2 +-
4 files changed, 45 insertions(+), 37 deletions(-)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-08 12:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 12:31 [gcc/devel/rust/master] Merge #1111 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).