diff options
| author | bors <bors@rust-lang.org> | 2024-10-01 19:29:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-01 19:29:26 +0000 |
| commit | e1441b728874c17f76f1b345279197ebdfba2622 (patch) | |
| tree | dad3c8d807eb2b29150deb2bc4c19b82e42a38fc | |
| parent | 161353105d59d6d6bbe3142dbe922fe7689f2041 (diff) | |
| parent | b2352737407768d503cda66aa86ae26fe6900ffb (diff) | |
| download | rust-e1441b728874c17f76f1b345279197ebdfba2622.tar.gz rust-e1441b728874c17f76f1b345279197ebdfba2622.zip | |
Auto merge of #131111 - matthiaskrgr:rollup-n6do187, r=matthiaskrgr
Rollup of 4 pull requests Successful merges: - #130005 (Replace -Z default-hidden-visibility with -Z default-visibility) - #130229 (ptr::add/sub: do not claim equivalence with `offset(c as isize)`) - #130773 (Update Unicode escapes in `/library/core/src/char/methods.rs`) - #130933 (rustdoc: lists items that contain multiple paragraphs are more clear) r? `@ghost` `@rustbot` modify labels: rollup
| -rw-r--r-- | src/allocator.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/allocator.rs b/src/allocator.rs index e9498857fb9..f13a75648ae 100644 --- a/src/allocator.rs +++ b/src/allocator.rs @@ -104,10 +104,17 @@ fn create_wrapper_function( false, ); - if tcx.sess.default_hidden_visibility() { - #[cfg(feature = "master")] - func.add_attribute(FnAttribute::Visibility(gccjit::Visibility::Hidden)); + #[cfg(feature = "master")] + match tcx.sess.default_visibility() { + rustc_target::spec::SymbolVisibility::Hidden => { + func.add_attribute(FnAttribute::Visibility(gccjit::Visibility::Hidden)) + } + rustc_target::spec::SymbolVisibility::Protected => { + func.add_attribute(FnAttribute::Visibility(gccjit::Visibility::Protected)) + } + rustc_target::spec::SymbolVisibility::Interposable => {} } + if tcx.sess.must_emit_unwind_tables() { // TODO(antoyo): emit unwind tables. } |
