From ffa7c44990752176430e1c3ef869c7529f0be95c Mon Sep 17 00:00:00 2001 From: Niklas Adofsson Date: Tue, 12 Jun 2018 13:30:27 +0200 Subject: [PATCH] fix error on nightly --- fixed-hash/src/hash.rs | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/fixed-hash/src/hash.rs b/fixed-hash/src/hash.rs index 1d67bed..c89a1c4 100644 --- a/fixed-hash/src/hash.rs +++ b/fixed-hash/src/hash.rs @@ -319,7 +319,7 @@ macro_rules! construct_hash { } } -#[cfg(feature="heapsizeof")] +#[cfg(all(feature="heapsizeof", feature="libc", not(target_os = "unknown")))] #[macro_export] #[doc(hidden)] macro_rules! impl_heapsize_for_hash { @@ -332,7 +332,7 @@ macro_rules! impl_heapsize_for_hash { } } -#[cfg(not(feature="heapsizeof"))] +#[cfg(any(not(feature="heapsizeof"), not(feature="libc"), target_os = "unknown"))] #[macro_export] #[doc(hidden)] macro_rules! impl_heapsize_for_hash { @@ -425,19 +425,6 @@ macro_rules! impl_std_for_hash_internals { ($from: ident, $size: tt) => {} } -#[cfg(all(feature="libc", not(target_os = "unknown")))] -#[macro_export] -#[doc(hidden)] -macro_rules! impl_heapsize_for_hash { - ($name: ident) => { - impl $crate::heapsize::HeapSizeOf for $name { - fn heap_size_of_children(&self) -> usize { - 0 - } - } - } -} - #[cfg(all(feature="libc", not(target_os = "unknown")))] #[macro_export] #[doc(hidden)]