Only define assert_size!() macro when testing.

This commit is contained in:
Emmanuel Gil Peyrot 2018-12-18 15:43:49 +01:00
parent 83f7c67870
commit 5e64dee0ed

View file

@ -552,6 +552,7 @@ macro_rules! generate_element {
); );
} }
#[cfg(test)]
macro_rules! assert_size ( macro_rules! assert_size (
($t:ty, $sz:expr) => ( ($t:ty, $sz:expr) => (
assert_eq!(::std::mem::size_of::<$t>(), $sz); assert_eq!(::std::mem::size_of::<$t>(), $sz);