diff options
| author | The rustc-josh-sync Cronjob Bot <github-actions@github.com> | 2025-08-25 04:13:22 +0000 |
|---|---|---|
| committer | The rustc-josh-sync Cronjob Bot <github-actions@github.com> | 2025-08-25 04:13:22 +0000 |
| commit | 721337b92a2ea898a21ea01e420d80e2e33213d2 (patch) | |
| tree | b92935283dc39332d14862c9227eda4b865a507b /library/std/src/thread/current.rs | |
| parent | c4cd29b7fbe3a924f248ea76d5e534b4e8f9b24c (diff) | |
| parent | a1dbb443527bd126452875eb5d5860c1d001d761 (diff) | |
| download | rust-721337b92a2ea898a21ea01e420d80e2e33213d2.tar.gz rust-721337b92a2ea898a21ea01e420d80e2e33213d2.zip | |
Merge ref 'a1dbb443527b' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: a1dbb443527bd126452875eb5d5860c1d001d761 Filtered ref: c2339048a82c55166f9b9ee83fd618be252a6e23 This merge was created using https://github.com/rust-lang/josh-sync.
Diffstat (limited to 'library/std/src/thread/current.rs')
| -rw-r--r-- | library/std/src/thread/current.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/library/std/src/thread/current.rs b/library/std/src/thread/current.rs index 5c879903526..7da1621da45 100644 --- a/library/std/src/thread/current.rs +++ b/library/std/src/thread/current.rs @@ -18,8 +18,8 @@ local_pointer! { pub(super) mod id { use super::*; - cfg_if::cfg_if! { - if #[cfg(target_thread_local)] { + cfg_select! { + target_thread_local => { use crate::cell::Cell; #[thread_local] @@ -34,7 +34,8 @@ pub(super) mod id { pub(super) fn set(id: ThreadId) { ID.set(Some(id)) } - } else if #[cfg(target_pointer_width = "16")] { + } + target_pointer_width = "16" => { local_pointer! { static ID0; static ID16; @@ -59,7 +60,8 @@ pub(super) mod id { ID32.set(ptr::without_provenance_mut((val >> 32) as usize)); ID48.set(ptr::without_provenance_mut((val >> 48) as usize)); } - } else if #[cfg(target_pointer_width = "32")] { + } + target_pointer_width = "32" => { local_pointer! { static ID0; static ID32; @@ -78,7 +80,8 @@ pub(super) mod id { ID0.set(ptr::without_provenance_mut(val as usize)); ID32.set(ptr::without_provenance_mut((val >> 32) as usize)); } - } else { + } + _ => { local_pointer! { static ID; } |
