#![no_std] #![deny(unsafe_code)] #[macro_use] extern crate static_assertions; use core::ops::Range; trait Tri {} impl Tri for T {} assert_impl_all!(u64: Tri<[&'static u8], dyn Tri, (u16, u16)>); assert_impl_all!(u8: Send, Sync); assert_impl_all!(&'static [u8]: IntoIterator); assert_impl_all!(Range: Iterator); assert_impl_all!([u8]: Send, Sync, AsRef<[u8]>); assert_impl_all!(str: Send, Sync, AsRef<[u8]>,); assert_impl_any!((): Send, Sync); assert_impl_any!((): Send, From); assert_impl_any!((): From, From, Send); #[allow(dead_code)] struct Foo; trait A {} trait B {} trait C {} impl B for Foo {} assert_impl_one!(Foo: A, B); assert_impl_one!(Foo: B, A); assert_impl_one!(Foo: B, C); assert_impl_one!(Foo: C, B); assert_impl_one!(Foo: A, B, C); assert_impl_one!(Foo: B, C, A); assert_impl_one!(Foo: C, A, B);