Asserts that values are equal in size.
This macro doesn't consume its arguments and thus works for
struct Byte(u8); let x = 10u8; let y = Byte(42); // Works for non-cloneable types assert_eq_size_val!(x, y); assert_eq_size_val!(x, y, 0u8);
Even though both values are 0, they are of types with different sizes:
ⓘThis example deliberately fails to compile