diff options
| author | antoyo <antoyo@users.noreply.github.com> | 2025-07-09 17:10:02 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-09 17:10:02 -0400 |
| commit | 35bdf8b4e22a787929686f5078d221d214764a25 (patch) | |
| tree | 6a8240d12579a8fcb602ae7a7df2dcce3f1f8208 | |
| parent | 86f5318bbebd5c93c05d71e8b1448500cff7eb52 (diff) | |
| parent | 63885243987a5df0e77ad0029961ebe8bd20cb18 (diff) | |
| download | rust-35bdf8b4e22a787929686f5078d221d214764a25.tar.gz rust-35bdf8b4e22a787929686f5078d221d214764a25.zip | |
Merge pull request #734 from FractalFir/remove_needless_attr
Skip needlessly setting the default visibility on functions
| -rw-r--r-- | src/mono_item.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mono_item.rs b/src/mono_item.rs index 539e3ac8507..82faeec948c 100644 --- a/src/mono_item.rs +++ b/src/mono_item.rs @@ -64,7 +64,7 @@ impl<'gcc, 'tcx> PreDefineCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> { if linkage != Linkage::Internal && self.tcx.is_compiler_builtins(LOCAL_CRATE) { #[cfg(feature = "master")] decl.add_attribute(FnAttribute::Visibility(gccjit::Visibility::Hidden)); - } else { + } else if visibility != Visibility::Default { #[cfg(feature = "master")] decl.add_attribute(FnAttribute::Visibility(base::visibility_to_gcc(visibility))); } |
