diff --git a/build.rs b/build.rs index a136b36..7875829 100644 --- a/build.rs +++ b/build.rs @@ -4,6 +4,8 @@ use std::env; fn main() { println!("cargo:rerun-if-changed=build.rs"); + println!("cargo:rustc-check-cfg=cfg(fuzzing)"); + println!("cargo:rustc-check-cfg=cfg(feature, values(\"folded_multiply\", \"specialize\"))"); if let Some(true) = version_check::supports_feature("specialize") { println!("cargo:rustc-cfg=feature=\"specialize\""); } diff --git a/src/random_state.rs b/src/random_state.rs index ebd12fa..5bf2c14 100644 --- a/src/random_state.rs +++ b/src/random_state.rs @@ -537,7 +537,6 @@ impl BuildHasher for RandomState { /// implementation of [`Hash`]. The way to create a combined hash of /// multiple values is to call [`Hash::hash`] multiple times using the same /// [`Hasher`], not to call this method repeatedly and combine the results. - #[cfg(feature = "specialize")] #[inline] fn hash_one(&self, x: V) -> u64 { use crate::specialize::CallHasher; @@ -624,7 +623,6 @@ impl BuildHasher for SmallState { /// implementation of [`Hash`]. The way to create a combined hash of /// multiple values is to call [`Hash::hash`] multiple times using the same /// [`Hasher`], not to call this method repeatedly and combine the results. - #[cfg(feature = "specialize")] #[inline] fn hash_one(&self, x: V) -> u64 { use crate::specialize::CallHasher;