Hi Arthur,

> I submitted the pull-request and will merge it soon:
>
> https://github.com/Rust-GCC/gccrs/pull/4549
>
> I've attached the patch if you would like to try it in the meantime.

I ran builds last night: you missed two instances as in the attachment,
but apart from that the patch worked just fine.

Thanks.
        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


diff --git a/gcc/rust/backend/rust-compile-base.cc b/gcc/rust/backend/rust-compile-base.cc
--- a/gcc/rust/backend/rust-compile-base.cc
+++ b/gcc/rust/backend/rust-compile-base.cc
@@ -62,7 +62,7 @@ HIRCompileBase::setup_fndecl (tree fndec
 {
   // if its the main fn or pub visibility mark its as DECL_PUBLIC
   // please see https://github.com/Rust-GCC/gccrs/pull/137
-  bool is_pub = visibility.get_vis_type () == HIR::Visibility::VisType::PUBLIC;
+  bool is_pub = visibility.get_vis_type () == HIR::Visibility::VisType::Public;
   if (is_main_entry_point || (is_pub && !is_generic_fn))
     {
       TREE_PUBLIC (fndecl) = 1;
diff --git a/gcc/rust/backend/rust-compile-implitem.cc b/gcc/rust/backend/rust-compile-implitem.cc
--- a/gcc/rust/backend/rust-compile-implitem.cc
+++ b/gcc/rust/backend/rust-compile-implitem.cc
@@ -96,7 +96,7 @@ CompileTraitItem::visit (HIR::TraitItemF
     = nr_ctx.to_canonical_path (func.get_mappings ().get_nodeid ());
 
   // FIXME: How do we get the proper visibility here?
-  auto vis = HIR::Visibility (HIR::Visibility::VisType::PUBLIC);
+  auto vis = HIR::Visibility (HIR::Visibility::VisType::Public);
   HIR::TraitFunctionDecl &function = func.get_decl ();
   tree fndecl
     = compile_function (false, function.get_function_name ().as_string (),

Reply via email to