2 releases
0.1.1 | Dec 25, 2020 |
---|---|
0.1.0 | Dec 25, 2020 |
#7 in #eq
6KB
compile-type-eq
This crate help you check type equality at compile time.
Example of usage:
use compile_type_eq::*;
assert_types_eq::<i32, i32>();
assert_types_not_eq::<i32, u32, _>();
This will fail:
use compile_type_eq::*;
assert_types_eq::<i32, u32>();
assert_types_not_eq::<i32, i32, _>();
For more complicated examples see examples folder
lib.rs
:
This crate help you check type equality at compile time.
Usage:
use compile_type_eq::*;
assert_types_eq::<i32, i32>();
assert_types_not_eq::<i32, u32, _>();
use compile_type_eq::*;
assert_types_eq::<i32, u32>();
assert_types_not_eq::<i32, i32, _>();
For more complicated examples see examples folder