diff options
| author | joboet <jonasboettiger@icloud.com> | 2024-06-17 12:41:41 +0200 |
|---|---|---|
| committer | joboet <jonasboettiger@icloud.com> | 2024-06-17 12:41:41 +0200 |
| commit | d70f071392ea812ffa3c7e4cca934b0767956173 (patch) | |
| tree | f864d7c682f2a6445f5edfedb13bb78dc8ca34a0 /library/std/src/sys | |
| parent | f3facf11758af878bcfaf47fc773962dbb565024 (diff) | |
| download | rust-d70f071392ea812ffa3c7e4cca934b0767956173.tar.gz rust-d70f071392ea812ffa3c7e4cca934b0767956173.zip | |
std: simplify `#[cfg]`s for TLS
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/thread_local/mod.rs | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/library/std/src/sys/thread_local/mod.rs b/library/std/src/sys/thread_local/mod.rs index 6e3d8382b42..aa2dd48ab49 100644 --- a/library/std/src/sys/thread_local/mod.rs +++ b/library/std/src/sys/thread_local/mod.rs @@ -42,28 +42,23 @@ cfg_if::cfg_if! { /// This module maintains a list of TLS destructors for the current thread, /// all of which will be run on thread exit. +#[cfg(all(target_thread_local, not(all(target_family = "wasm", not(target_feature = "atomics")))))] pub(crate) mod destructors { cfg_if::cfg_if! { - if #[cfg(all( - target_thread_local, - any( - target_os = "linux", - target_os = "android", - target_os = "fuchsia", - target_os = "redox", - target_os = "hurd", - target_os = "netbsd", - target_os = "dragonfly" - ) + if #[cfg(any( + target_os = "linux", + target_os = "android", + target_os = "fuchsia", + target_os = "redox", + target_os = "hurd", + target_os = "netbsd", + target_os = "dragonfly" ))] { mod linux; mod list; pub(super) use linux::register; pub(super) use list::run; - } else if #[cfg(all( - target_thread_local, - not(all(target_family = "wasm", not(target_feature = "atomics"))) - ))] { + } else { mod list; pub(super) use list::register; pub(crate) use list::run; |
