[][src]Macro static_assertions::assert_type_ne_all

macro_rules! assert_type_ne_all {
    ($x:ty, $($y:ty),+ $(,)?) => { ... };
}

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:

This example deliberately fails to compile
use std::os::raw::c_uchar;

assert_type_ne_all!(c_uchar, u8, u32);