Crate same_types[][src]

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 that two or more types are exactly the same. Compilation error otherwise.

Traits

Helper trait for assert_same_types to tell if two types are exactly the same.