diff --git a/beacon_node/db/src/stores/macros.rs b/beacon_node/db/src/stores/macros.rs index 36b8aef8e3..e26e101c9d 100644 --- a/beacon_node/db/src/stores/macros.rs +++ b/beacon_node/db/src/stores/macros.rs @@ -20,7 +20,7 @@ macro_rules! impl_crud_for_store { }; } -#[allow(unused_macros)] +#[cfg(test)] macro_rules! test_crud_for_store { ($store: ident, $db_column: expr) => { #[test] diff --git a/eth2/types/src/slot_epoch_macros.rs b/eth2/types/src/slot_epoch_macros.rs index b0550f2f83..22355fefee 100644 --- a/eth2/types/src/slot_epoch_macros.rs +++ b/eth2/types/src/slot_epoch_macros.rs @@ -21,6 +21,7 @@ macro_rules! impl_from_into_u64 { } // need to truncate for some fork-choice algorithms +#[allow(unused_macros)] macro_rules! impl_into_u32 { ($main: ident) => { impl Into for $main { @@ -267,7 +268,7 @@ macro_rules! impl_common { } // test macros -#[allow(unused_macros)] +#[cfg(test)] macro_rules! new_tests { ($type: ident) => { #[test] @@ -279,7 +280,7 @@ macro_rules! new_tests { }; } -#[allow(unused_macros)] +#[cfg(test)] macro_rules! from_into_tests { ($type: ident, $other: ident) => { #[test] @@ -305,7 +306,7 @@ macro_rules! from_into_tests { }; } -#[allow(unused_macros)] +#[cfg(test)] macro_rules! math_between_tests { ($type: ident, $other: ident) => { #[test] @@ -453,7 +454,7 @@ macro_rules! math_between_tests { }; } -#[allow(unused_macros)] +#[cfg(test)] macro_rules! math_tests { ($type: ident) => { #[test] @@ -575,7 +576,7 @@ macro_rules! ssz_tests { }; } -#[allow(unused_macros)] +#[cfg(test)] macro_rules! all_tests { ($type: ident) => { new_tests!($type);