about summary refs log tree commit diff
path: root/library/std/src/sys/sync/thread_parking/mod.rs
diff options
context:
space:
mode:
authorThe Miri Cronjob Bot <miri@cron.bot>2025-08-20 05:01:50 +0000
committerThe Miri Cronjob Bot <miri@cron.bot>2025-08-20 05:01:50 +0000
commit8d09fb5e6d330b2e32bb98b89fb8a3fadd2bfd48 (patch)
tree8b927cdee8253f3df663c2931a1c6bc8fc980eb2 /library/std/src/sys/sync/thread_parking/mod.rs
parent49329f0d8a2a79e363150f9b40778a0751ba22e8 (diff)
parentf605b57042ffeb320d7ae44490113a827139b766 (diff)
downloadrust-8d09fb5e6d330b2e32bb98b89fb8a3fadd2bfd48.tar.gz
rust-8d09fb5e6d330b2e32bb98b89fb8a3fadd2bfd48.zip
Merge ref 'f605b57042ff' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: f605b57042ffeb320d7ae44490113a827139b766
Filtered ref: c69d2743ed4676c4529ebb60b258f6c1273c9145

This merge was created using https://github.com/rust-lang/josh-sync.
Diffstat (limited to 'library/std/src/sys/sync/thread_parking/mod.rs')
-rw-r--r--library/std/src/sys/sync/thread_parking/mod.rs26
1 files changed, 16 insertions, 10 deletions
diff --git a/library/std/src/sys/sync/thread_parking/mod.rs b/library/std/src/sys/sync/thread_parking/mod.rs
index f4d8fa0a58c..b9fb27b4eef 100644
--- a/library/std/src/sys/sync/thread_parking/mod.rs
+++ b/library/std/src/sys/sync/thread_parking/mod.rs
@@ -1,5 +1,5 @@
-cfg_if::cfg_if! {
-    if #[cfg(any(
+cfg_select! {
+    any(
         all(target_os = "windows", not(target_vendor = "win7")),
         target_os = "linux",
         target_os = "android",
@@ -9,30 +9,36 @@ cfg_if::cfg_if! {
         target_os = "dragonfly",
         target_os = "fuchsia",
         target_os = "hermit",
-    ))] {
+    ) => {
         mod futex;
         pub use futex::Parker;
-    } else if #[cfg(any(
+    }
+    any(
         target_os = "netbsd",
         all(target_vendor = "fortanix", target_env = "sgx"),
         target_os = "solid_asp3",
-    ))] {
+    ) => {
         mod id;
         pub use id::Parker;
-    } else if #[cfg(target_vendor = "win7")] {
+    }
+    target_vendor = "win7" => {
         mod windows7;
         pub use windows7::Parker;
-    } else if #[cfg(all(target_vendor = "apple", not(miri)))] {
+    }
+    all(target_vendor = "apple", not(miri)) => {
         // Doesn't work in Miri, see <https://github.com/rust-lang/miri/issues/2589>.
         mod darwin;
         pub use darwin::Parker;
-    } else if #[cfg(target_os = "xous")] {
+    }
+    target_os = "xous" => {
         mod xous;
         pub use xous::Parker;
-    } else if #[cfg(target_family = "unix")] {
+    }
+    target_family = "unix" => {
         mod pthread;
         pub use pthread::Parker;
-    } else {
+    }
+    _ => {
         mod unsupported;
         pub use unsupported::Parker;
     }