Merge rust-bitcoin/rust-bitcoin#7071: hashes: Allow deprecated_in_future in cpufeatures modules
What changed, and why it matters
This is a minor code-quality patch that adds a compiler warning suppression. It does not change any runtime behavior, cryptographic logic, or security boundary. The change simply tells Rust not to warn about a deprecated function used internally by a dependency (cpufeatures).
No security action required. Treat as routine maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit expands #[allow(deprecated)] to #[allow(deprecated, deprecated_in_future)] on four cpufeatures wrapper modules in hashes/src/sha256/crypto/mod.rs. The cpufeatures::new! macro expands to u8::max_value(), which triggers the deprecated_in_future lint under the crate-wide deny/warn configuration. This patch silences that lint only; no functional code is modified.
Changed components
hashes/src/sha256/crypto/mod.rsInspect captured patch +4 / −4
### hashes/src/sha256/crypto/mod.rs
@@ -31,29 +31,29 @@ use super::{HashEngine, Midstate, BLOCK_SIZE};
#[cfg(target_endian = "little")]
// cpufeatures crate internally uses deprecated `u8::max_value()`.
// See: https://docs.rs/cpufeatures/0.2.17/src/cpufeatures/lib.rs.html#161
-#[allow(deprecated)]
+#[allow(deprecated, deprecated_in_future)]
mod cpuid_sha256_aarch64 {
cpufeatures::new!(inner, "sha2");
pub fn get() -> bool { inner::get() }
}
#[cfg(feature = "cpufeatures")]
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
// See: https://docs.rs/cpufeatures/0.2.17/src/cpufeatures/lib.rs.html#161
-#[allow(deprecated)]
+#[allow(deprecated, deprecated_in_future)]
mod cpuid_sha256_x86 {
cpufeatures::new!(inner, "sha", "sse2", "ssse3", "sse4.1");
pub fn get() -> bool { inner::get() }
}
#[cfg(feature = "cpufeatures")]
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
-#[allow(deprecated)]
+#[allow(deprecated, deprecated_in_future)]
mod cpuid_sse41_x86 {
cpufeatures::new!(inner, "sse2", "ssse3", "sse4.1");
pub fn get() -> bool { inner::get() }
}
#[cfg(feature = "cpufeatures")]
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
-#[allow(deprecated)]
+#[allow(deprecated, deprecated_in_future)]
mod cpuid_avx2_x86 {
cpufeatures::new!(inner, "avx", "avx2");
pub fn get() -> bool { inner::get() }Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.