diff options
| author | Jubilee Young <workingjubilee@gmail.com> | 2024-08-01 20:43:02 -0700 |
|---|---|---|
| committer | Jubilee Young <workingjubilee@gmail.com> | 2024-08-01 20:45:38 -0700 |
| commit | 2f0aaaf2b9fc401708946e60e0f7dabf3c1bf30e (patch) | |
| tree | a9b565eb76072c29f7fc8f17dc0fa087971ca9ff | |
| parent | 425ae69588182ae140bc3392bab53391f72d91a9 (diff) | |
| download | rust-2f0aaaf2b9fc401708946e60e0f7dabf3c1bf30e.tar.gz rust-2f0aaaf2b9fc401708946e60e0f7dabf3c1bf30e.zip | |
std: Remove has_cpuid
The one use of it was guaranteed to be always true.
| -rw-r--r-- | library/std/src/lib.rs | 4 | ||||
| -rw-r--r-- | library/std/src/sys/pal/uefi/time.rs | 8 |
2 files changed, 0 insertions, 12 deletions
diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 6bd9c59a949..a760fee42c8 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -269,10 +269,6 @@ #![cfg_attr(any(windows, target_os = "uefi"), feature(round_char_boundary))] #![cfg_attr(target_family = "wasm", feature(stdarch_wasm_atomic_wait))] #![cfg_attr(target_arch = "wasm64", feature(simd_wasm64))] -#![cfg_attr( - all(any(target_arch = "x86_64", target_arch = "x86"), target_os = "uefi"), - feature(stdarch_x86_has_cpuid) -)] // // Language features: // tidy-alphabetical-start diff --git a/library/std/src/sys/pal/uefi/time.rs b/library/std/src/sys/pal/uefi/time.rs index a97d69f997b..495ff2dc930 100644 --- a/library/std/src/sys/pal/uefi/time.rs +++ b/library/std/src/sys/pal/uefi/time.rs @@ -175,10 +175,6 @@ pub(crate) mod instant_internal { #[cfg(target_arch = "x86_64")] fn timestamp_rdtsc() -> Option<Duration> { - if !crate::arch::x86_64::has_cpuid() { - return None; - } - static FREQUENCY: crate::sync::OnceLock<u64> = crate::sync::OnceLock::new(); // Get Frequency in Mhz @@ -200,10 +196,6 @@ pub(crate) mod instant_internal { #[cfg(target_arch = "x86")] fn timestamp_rdtsc() -> Option<Duration> { - if !crate::arch::x86::has_cpuid() { - return None; - } - static FREQUENCY: crate::sync::OnceLock<u64> = crate::sync::OnceLock::new(); let freq = FREQUENCY |
