diff options
Diffstat (limited to 'library/stdarch/crates/std_detect/src/detect')
| -rw-r--r-- | library/stdarch/crates/std_detect/src/detect/cache.rs | 9 | ||||
| -rw-r--r-- | library/stdarch/crates/std_detect/src/detect/os/x86.rs | 2 |
2 files changed, 4 insertions, 7 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(); |
