From 2140bf36074b67c09162e1f9e9e76a6c4546e4f1 Mon Sep 17 00:00:00 2001 From: Tom Kaitchuck Date: Sat, 17 Feb 2024 00:45:01 -0800 Subject: [PATCH] Reduce scope of ARM changes to avoid MSRV update Signed-off-by: Tom Kaitchuck --- Cargo.toml | 2 +- src/lib.rs | 2 +- src/operations.rs | 4 ++-- src/random_state.rs | 2 +- tests/bench.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 32b7f0f..01faf1e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ edition = "2018" readme = "README.md" build = "./build.rs" exclude = ["/smhasher", "/benchmark_tools"] -rust-version = "1.72.0" +rust-version = "1.60.0" [lib] name = "ahash" diff --git a/src/lib.rs b/src/lib.rs index 500f430..653c3bc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -108,7 +108,7 @@ mod fallback_hash; cfg_if::cfg_if! { if #[cfg(any( all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)), - all(target_arch = "aarch64", target_feature = "aes", not(miri)), + all(feature = "nightly-arm-aes", target_arch = "aarch64", target_feature = "aes", not(miri)), all(feature = "nightly-arm-aes", target_arch = "arm", target_feature = "aes", not(miri)), ))] { mod aes_hash; diff --git a/src/operations.rs b/src/operations.rs index a420587..008624a 100644 --- a/src/operations.rs +++ b/src/operations.rs @@ -111,7 +111,7 @@ pub(crate) fn aesenc(value: u128, xor: u128) -> u128 { } #[cfg(any( - all(target_arch = "aarch64", target_feature = "aes", not(miri)), + all(feature = "nightly-arm-aes", target_arch = "aarch64", target_feature = "aes", not(miri)), all(feature = "nightly-arm-aes", target_arch = "arm", target_feature = "aes", not(miri)), ))] #[allow(unused)] @@ -141,7 +141,7 @@ pub(crate) fn aesdec(value: u128, xor: u128) -> u128 { } #[cfg(any( - all(target_arch = "aarch64", target_feature = "aes", not(miri)), + all(feature = "nightly-arm-aes", target_arch = "aarch64", target_feature = "aes", not(miri)), all(feature = "nightly-arm-aes", target_arch = "arm", target_feature = "aes", not(miri)), ))] #[allow(unused)] diff --git a/src/random_state.rs b/src/random_state.rs index 3db8396..3ee629f 100644 --- a/src/random_state.rs +++ b/src/random_state.rs @@ -2,7 +2,7 @@ use core::hash::Hash; cfg_if::cfg_if! { if #[cfg(any( all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)), - all(target_arch = "aarch64", target_feature = "aes", not(miri)), + all(feature = "nightly-arm-aes", target_arch = "aarch64", target_feature = "aes", not(miri)), all(feature = "nightly-arm-aes", target_arch = "arm", target_feature = "aes", not(miri)), ))] { use crate::aes_hash::*; diff --git a/tests/bench.rs b/tests/bench.rs index e038ba4..59287ab 100644 --- a/tests/bench.rs +++ b/tests/bench.rs @@ -14,7 +14,7 @@ const AHASH_IMPL: &str = if cfg!(any( target_feature = "aes", not(miri), ), - all(target_arch = "aarch64", target_feature = "aes", not(miri)), + all(feature = "nightly-arm-aes", target_arch = "aarch64", target_feature = "aes", not(miri)), all( feature = "nightly-arm-aes", target_arch = "arm",