Skip to content

Commit 0587715

Browse files
committed
Fix non-UNIX builds
1 parent c6891dd commit 0587715

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

library/std/src/sys/thread_local/key/sgx.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ pub unsafe fn destroy(key: Key) {
2222
Tls::destroy(AbiKey::from_usize(key))
2323
}
2424

25-
pub unsafe fn at_process_exit(cb: unsafe extern "C" fn()) {}
25+
pub unsafe fn at_process_exit(cb: unsafe extern "C" fn()) {
26+
let _ = cb;
27+
}

library/std/src/sys/thread_local/key/windows.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,5 +202,3 @@ pub unsafe fn run_dtors() {
202202
}
203203
}
204204
}
205-
206-
pub unsafe fn at_process_exit(cb: unsafe extern "C" fn()) {}

library/std/src/sys/thread_local/key/xous.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,5 +215,3 @@ unsafe fn run_dtors() {
215215

216216
crate::rt::thread_cleanup();
217217
}
218-
219-
pub unsafe fn at_process_exit(cb: unsafe extern "C" fn()) {}

library/std/src/sys/thread_local/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub(crate) mod key {
149149
#[cfg(test)]
150150
mod tests;
151151
mod windows;
152-
pub(super) use windows::{Key, LazyKey, get, run_dtors, set, at_process_exit};
152+
pub(super) use windows::{Key, LazyKey, get, run_dtors, set};
153153
} else if #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] {
154154
mod racy;
155155
mod sgx;
@@ -165,7 +165,7 @@ pub(crate) mod key {
165165
mod xous;
166166
pub(super) use racy::LazyKey;
167167
pub(crate) use xous::destroy_tls;
168-
pub(super) use xous::{Key, get, set, at_process_exit};
168+
pub(super) use xous::{Key, get, set};
169169
use xous::{create, destroy};
170170
}
171171
}

0 commit comments

Comments
 (0)