Crates.io | same-types |
lib.rs | same-types |
version | 0.1.1 |
source | src |
created_at | 2021-08-24 17:07:29.780873 |
updated_at | 2021-08-24 17:29:35.518374 |
description | Ensure that two types are the same. |
homepage | https://github.com/Kijewski/tupleops |
repository | https://github.com/Kijewski/tupleops |
max_upload_size | |
id | 441771 |
size | 16,110 |
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);