about summary refs log tree commit diff
diff options
context:
space:
mode:
authorIngvar Stepanyan <me@rreverser.com>2023-01-14 12:29:41 +0000
committerGitHub <noreply@github.com>2023-01-14 12:29:41 +0000
commita41c5f9c381aeb6cb29afd1a0ca79f31d257cd6c (patch)
tree1c18e1aeccc8ff6be157a53c0cb80de7988bd58f
parent6155b9a772c944702f931ce5940d6c19cb7ced07 (diff)
downloadrust-a41c5f9c381aeb6cb29afd1a0ca79f31d257cd6c.tar.gz
rust-a41c5f9c381aeb6cb29afd1a0ca79f31d257cd6c.zip
Re-add #[allow(unused)] attr
-rw-r--r--library/std/src/sys/unix/thread_local_dtor.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/sys/unix/thread_local_dtor.rs b/library/std/src/sys/unix/thread_local_dtor.rs
index aa4df000632..6810e197df8 100644
--- a/library/std/src/sys/unix/thread_local_dtor.rs
+++ b/library/std/src/sys/unix/thread_local_dtor.rs
@@ -89,6 +89,7 @@ pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) {
 }
 
 #[cfg(any(target_os = "vxworks", target_os = "horizon", target_os = "emscripten"))]
+#[cfg_attr(target_family = "wasm", allow(unused))] // might remain unused depending on target details (e.g. wasm32-unknown-emscripten)
 pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) {
     use crate::sys_common::thread_local_dtor::register_dtor_fallback;
     register_dtor_fallback(t, dtor);