about summary refs log tree commit diff
path: root/library/std/src/sys/alloc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-02-15 00:30:50 +0000
committerbors <bors@rust-lang.org>2025-02-15 00:30:50 +0000
commit54a0f387ea8c7bcb79b8e40c074a484d31b51990 (patch)
treebd5bfdfaa0b9785d57db609764e8f6d867f6f932 /library/std/src/sys/alloc
parentfc147b4a81bea997e544afa8f8f05af73c759231 (diff)
parent9d659fc2bec22a991a1a728ec3f995c51386ff6e (diff)
downloadrust-54a0f387ea8c7bcb79b8e40c074a484d31b51990.tar.gz
rust-54a0f387ea8c7bcb79b8e40c074a484d31b51990.zip
Auto merge of #137046 - workingjubilee:rollup-u56aw1m, r=workingjubilee
Rollup of 10 pull requests

Successful merges:

 - #133312 (triagebot: automatically add more rustdoc related labels)
 - #134016 (Stabilize `const_is_char_boundary` and `const_str_split_at`.)
 - #136971 (Add a new check-pass UI test for returning `impl Fn(T) -> impl Trait`)
 - #136983 (Prepare standard library for Rust 2024 migration)
 - #137002 (Fix early lint check desc in query)
 - #137006 (borrowck diagnostics cleanup: remove an unused and a barely-used field)
 - #137032 (Decode metadata buffer in one go)
 - #137035 (Normalize closure instance before eagerly monomorphizing it)
 - #137037 (add x86-sse2 (32bit) ABI that requires SSE2 target feature)
 - #137038 (llvm: Tolerate captures in tests)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/sys/alloc')
-rw-r--r--library/std/src/sys/alloc/sgx.rs6
-rw-r--r--library/std/src/sys/alloc/xous.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/sys/alloc/sgx.rs b/library/std/src/sys/alloc/sgx.rs
index fca9d087e5b..f5c27688fbc 100644
--- a/library/std/src/sys/alloc/sgx.rs
+++ b/library/std/src/sys/alloc/sgx.rs
@@ -11,7 +11,7 @@ use crate::sys::pal::waitqueue::SpinMutex;
 // in the rust-lang/rust repository as a submodule. The crate is a port of
 // dlmalloc.c from C to Rust.
 #[cfg_attr(test, linkage = "available_externally")]
-#[export_name = "_ZN16__rust_internals3std3sys3sgx5alloc8DLMALLOCE"]
+#[unsafe(export_name = "_ZN16__rust_internals3std3sys3sgx5alloc8DLMALLOCE")]
 static DLMALLOC: SpinMutex<dlmalloc::Dlmalloc<Sgx>> =
     SpinMutex::new(dlmalloc::Dlmalloc::new_with_allocator(Sgx {}));
 
@@ -85,13 +85,13 @@ unsafe impl GlobalAlloc for System {
 // The following functions are needed by libunwind. These symbols are named
 // in pre-link args for the target specification, so keep that in sync.
 #[cfg(not(test))]
-#[no_mangle]
+#[unsafe(no_mangle)]
 pub unsafe extern "C" fn __rust_c_alloc(size: usize, align: usize) -> *mut u8 {
     unsafe { crate::alloc::alloc(Layout::from_size_align_unchecked(size, align)) }
 }
 
 #[cfg(not(test))]
-#[no_mangle]
+#[unsafe(no_mangle)]
 pub unsafe extern "C" fn __rust_c_dealloc(ptr: *mut u8, size: usize, align: usize) {
     unsafe { crate::alloc::dealloc(ptr, Layout::from_size_align_unchecked(size, align)) }
 }
diff --git a/library/std/src/sys/alloc/xous.rs b/library/std/src/sys/alloc/xous.rs
index 9d22e16fdf2..ccaa972c22d 100644
--- a/library/std/src/sys/alloc/xous.rs
+++ b/library/std/src/sys/alloc/xous.rs
@@ -4,7 +4,7 @@
 use crate::alloc::{GlobalAlloc, Layout, System};
 
 #[cfg(not(test))]
-#[export_name = "_ZN16__rust_internals3std3sys4xous5alloc8DLMALLOCE"]
+#[unsafe(export_name = "_ZN16__rust_internals3std3sys4xous5alloc8DLMALLOCE")]
 static mut DLMALLOC: dlmalloc::Dlmalloc = dlmalloc::Dlmalloc::new();
 
 #[cfg(test)]