Macro static_assertions::assert_type_ne_all [−][src]
Asserts that all types are not equal to each other.
Examples
Rust has all sorts of slices, but they represent different types of data:
assert_type_ne_all!([u8], [u16], str);
The following example fails to compile because c_uchar
is a type alias
for u8
:
ⓘ
use std::os::raw::c_uchar; assert_type_ne_all!(c_uchar, u8, u32);