diff options
Diffstat (limited to 'library/stdarch/crates/std_detect')
4 files changed, 6 insertions, 15 deletions
diff --git a/library/stdarch/crates/std_detect/src/detect/cache.rs b/library/stdarch/crates/std_detect/src/detect/cache.rs index 422bd6817da..92bc4b58d16 100644 --- a/library/stdarch/crates/std_detect/src/detect/cache.rs +++ b/library/stdarch/crates/std_detect/src/detect/cache.rs @@ -30,7 +30,7 @@ const CACHE_CAPACITY: u32 = 63; #[derive(Copy, Clone)] pub(crate) struct Initializer(u64); -#[cfg_attr(feature = "cargo-clippy", allow(clippy::use_self))] +#[allow(clippy::use_self)] impl Default for Initializer { fn default() -> Self { Initializer(0) @@ -76,13 +76,10 @@ static CACHE: Cache = Cache::uninitialized(); struct Cache(AtomicU64); #[cfg(target_pointer_width = "64")] -#[cfg_attr(feature = "cargo-clippy", allow(clippy::use_self))] +#[allow(clippy::use_self)] impl Cache { /// Creates an uninitialized cache. - #[cfg_attr( - feature = "cargo-clippy", - allow(clippy::declare_interior_mutable_const) - )] + #[allow(clippy::declare_interior_mutable_const)] const fn uninitialized() -> Self { Cache(AtomicU64::new(u64::max_value())) } diff --git a/library/stdarch/crates/std_detect/src/detect/os/x86.rs b/library/stdarch/crates/std_detect/src/detect/os/x86.rs index 675601536fa..db8aa261188 100644 --- a/library/stdarch/crates/std_detect/src/detect/os/x86.rs +++ b/library/stdarch/crates/std_detect/src/detect/os/x86.rs @@ -30,7 +30,7 @@ pub fn check_for(x: Feature) -> bool { /// [wiki_cpuid]: https://en.wikipedia.org/wiki/CPUID /// [intel64_ref]: http://www.intel.de/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf /// [amd64_ref]: http://support.amd.com/TechDocs/24594.pdf -#[cfg_attr(feature = "cargo-clippy", allow(clippy::similar_names))] +#[allow(clippy::similar_names)] fn detect_features() -> cache::Initializer { let mut value = cache::Initializer::default(); diff --git a/library/stdarch/crates/std_detect/tests/cpu-detection.rs b/library/stdarch/crates/std_detect/tests/cpu-detection.rs index 85beeee63ac..b2b8abb0102 100644 --- a/library/stdarch/crates/std_detect/tests/cpu-detection.rs +++ b/library/stdarch/crates/std_detect/tests/cpu-detection.rs @@ -1,9 +1,6 @@ #![feature(stdsimd)] #![cfg_attr(stdsimd_strict, deny(warnings))] -#![cfg_attr( - feature = "cargo-clippy", - allow(clippy::option_unwrap_used, clippy::use_debug, clippy::print_stdout) -)] +#![allow(clippy::option_unwrap_used, clippy::use_debug, clippy::print_stdout)] #[cfg(any( target_arch = "arm", diff --git a/library/stdarch/crates/std_detect/tests/macro_trailing_commas.rs b/library/stdarch/crates/std_detect/tests/macro_trailing_commas.rs index d63da6af06a..df03e6555aa 100644 --- a/library/stdarch/crates/std_detect/tests/macro_trailing_commas.rs +++ b/library/stdarch/crates/std_detect/tests/macro_trailing_commas.rs @@ -1,9 +1,6 @@ #![feature(stdsimd)] #![cfg_attr(stdsimd_strict, deny(warnings))] -#![cfg_attr( - feature = "cargo-clippy", - allow(clippy::option_unwrap_used, clippy::use_debug, clippy::print_stdout) -)] +#![allow(clippy::option_unwrap_used, clippy::use_debug, clippy::print_stdout)] #[cfg(any( target_arch = "arm", |
