[][src]Macro static_assertions::assert_trait_sub_all

macro_rules! assert_trait_sub_all {
    ($sub:path: $($super:path),+ $(,)?) => { ... };
}

Asserts that the trait is a child of all of the other traits.

Related:

Examples

All types that implement Copy must implement Clone:

assert_trait_sub_all!(Copy: Clone);

All types that implement Ord must implement PartialEq, Eq, and PartialOrd:

assert_trait_sub_all!(Ord: PartialEq, Eq, PartialOrd);

The following example fails to compile because Eq is not required for PartialOrd:

This example deliberately fails to compile
assert_trait_sub_all!(PartialOrd: Eq);