From 5e64dee0edb4a1cee0ed8d46a97f634adafbc10e Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Tue, 18 Dec 2018 15:43:49 +0100 Subject: [PATCH] Only define assert_size!() macro when testing. --- src/macros.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/macros.rs b/src/macros.rs index ac77ed5..d1a4074 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -552,6 +552,7 @@ macro_rules! generate_element { ); } +#[cfg(test)] macro_rules! assert_size ( ($t:ty, $sz:expr) => ( assert_eq!(::std::mem::size_of::<$t>(), $sz);