diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-04-11 14:15:10 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-04-11 17:18:02 +0200 |
commit | 2a264a36932288c2a1fe848b03eab977267761dd (patch) | |
tree | 140ae5f9ff0e73a0cc03fe41144c249ba85402d7 /gcc/rust/backend/rust-compile-implitem.cc | |
parent | 68458036c81d141a3899ac4e6ec6ddf0fdfde174 (diff) | |
download | gcc-2a264a36932288c2a1fe848b03eab977267761dd.zip gcc-2a264a36932288c2a1fe848b03eab977267761dd.tar.gz gcc-2a264a36932288c2a1fe848b03eab977267761dd.tar.bz2 |
hir: Cleanup Visibility struct
The HIR::Visibility struct was extremely similar to the AST::Visibility
one. However, we do not need to keep as much information at the HIR
level: Syntactic sugar such as pub(crate) can be kept as the desugared
form, which is pub(in crate). Likewise, pub(self) can be desugared to
pub(in self) which amounts to having a private item.
Diffstat (limited to 'gcc/rust/backend/rust-compile-implitem.cc')
-rw-r--r-- | gcc/rust/backend/rust-compile-implitem.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/rust/backend/rust-compile-implitem.cc b/gcc/rust/backend/rust-compile-implitem.cc index 8dc18d3..b44cdc9 100644 --- a/gcc/rust/backend/rust-compile-implitem.cc +++ b/gcc/rust/backend/rust-compile-implitem.cc @@ -84,9 +84,8 @@ CompileTraitItem::visit (HIR::TraitItemFunc &func) &canonical_path); rust_assert (ok); - // FIXME - HIR::Visibility vis (HIR::Visibility::PublicVisType::NONE, - AST::SimplePath::create_empty ()); + // FIXME: Get from lowering the item's visibility instead + auto vis = HIR::Visibility::create_public (); HIR::TraitFunctionDecl &function = func.get_decl (); tree fndecl = compile_function (ctx, function.get_function_name (), |