1bcab3026Sopenharmony_ci#![no_std]
2bcab3026Sopenharmony_ci#![deny(unsafe_code)]
3bcab3026Sopenharmony_ci
4bcab3026Sopenharmony_ci#[macro_use]
5bcab3026Sopenharmony_ciextern crate static_assertions;
6bcab3026Sopenharmony_ci
7bcab3026Sopenharmony_ciuse core::ops::Range;
8bcab3026Sopenharmony_ci
9bcab3026Sopenharmony_citrait Tri<A: ?Sized, B: ?Sized, C: ?Sized> {}
10bcab3026Sopenharmony_ci
11bcab3026Sopenharmony_ciimpl<T, A: ?Sized, B: ?Sized, C: ?Sized> Tri<A, B, C> for T {}
12bcab3026Sopenharmony_ci
13bcab3026Sopenharmony_ciassert_impl_all!(u64: Tri<[&'static u8], dyn Tri<dyn Send, dyn Sync, str>, (u16, u16)>);
14bcab3026Sopenharmony_ciassert_impl_all!(u8: Send, Sync);
15bcab3026Sopenharmony_ciassert_impl_all!(&'static [u8]: IntoIterator<Item=&'static u8>);
16bcab3026Sopenharmony_ciassert_impl_all!(Range<u8>: Iterator<Item=u8>);
17bcab3026Sopenharmony_ciassert_impl_all!([u8]: Send, Sync, AsRef<[u8]>);
18bcab3026Sopenharmony_ciassert_impl_all!(str: Send, Sync, AsRef<[u8]>,);
19bcab3026Sopenharmony_ci
20bcab3026Sopenharmony_ciassert_impl_any!((): Send, Sync);
21bcab3026Sopenharmony_ciassert_impl_any!((): Send, From<u8>);
22bcab3026Sopenharmony_ciassert_impl_any!((): From<u8>, From<u16>, Send);
23bcab3026Sopenharmony_ci
24bcab3026Sopenharmony_ci#[allow(dead_code)]
25bcab3026Sopenharmony_cistruct Foo;
26bcab3026Sopenharmony_ci
27bcab3026Sopenharmony_citrait A {}
28bcab3026Sopenharmony_citrait B {}
29bcab3026Sopenharmony_citrait C {}
30bcab3026Sopenharmony_ci
31bcab3026Sopenharmony_ciimpl B for Foo {}
32bcab3026Sopenharmony_ci
33bcab3026Sopenharmony_ciassert_impl_one!(Foo: A, B);
34bcab3026Sopenharmony_ciassert_impl_one!(Foo: B, A);
35bcab3026Sopenharmony_ciassert_impl_one!(Foo: B, C);
36bcab3026Sopenharmony_ciassert_impl_one!(Foo: C, B);
37bcab3026Sopenharmony_ciassert_impl_one!(Foo: A, B, C);
38bcab3026Sopenharmony_ciassert_impl_one!(Foo: B, C, A);
39bcab3026Sopenharmony_ciassert_impl_one!(Foo: C, A, B);
40