Expand description
Ensure that two types are the same, or fail with a compilation error.
use same_types::assert_same_types;
assert_same_types!(u32, u32, u32, u32);
ⓘ
use same_types::assert_same_types;
// Fails with the message:
// the trait `SameTypes` is not implemented for `(i32, u32)`
assert_same_types!(u32, u32, i32, u32);
Macros§
- assert_
same_ types - Assert that two or more types are exactly the same. Compilation error otherwise.
Traits§
- Same
Types - Helper trait for assert_same_types to tell if two types are exactly the same.