1#![cfg_attr(not(feature = "std"), no_std)]
2
3pub mod alloc;
4pub mod borrow;
5pub mod cmp;
6pub mod convert;
7pub mod error;
8pub mod fmt;
9pub mod future;
10pub mod hash;
11#[cfg(feature = "std")]
12pub mod io;
13pub mod iter;
14#[cfg(feature = "std")]
15pub mod net;
16pub mod ops;
17#[cfg(feature = "std")]
18pub mod process;
19#[cfg(feature = "std")]
20pub mod string;
21#[cfg(feature = "std")]
22pub mod task;
23
24pub use newer_type;
25
26macro_rules! emit_traits {
27    () => {};
28    (
29        $(#[doc = $doc0:literal])*
30        $(
31            $(#[implement_of($($implement_of:tt)*)])+
32            #[slot($($slot_ty:tt)*)]
33        )?
34        $(#[doc = $doc1:literal])*
35        #[target(alternative = $alternative:path)]
36        $(#[$($other_attr:tt)*])*
37        pub trait $trait_name:ident $([$($trait_params:tt)+])? $(: [$($supertraits:tt)*])?
38        $(where [$($where_clause:tt)*])?
39        {$($trait_contents:tt)*}
40        $($t:tt)*
41    ) => {
42        $(#[$($other_attr)*])*
43        #[target(alternative = $alternative, newer_type = $crate::newer_type, repeater = $crate::Repeater)]
44        $(
45            #[doc = $doc0]
46            #[doc = ""]
47        )*
48        #[doc = concat!("This trait is empty declaration of [`", stringify!($alternative), "`] to be used")]
49        #[doc = "with [`newer_type::implement`]."]
50        $(
51            #[doc = ""]
52            #[doc = "# Example"]
53            #[doc = ""]
54            #[doc = "```"]
55            #[doc = "# use newer_type::implement;"]
56            $(#[doc = concat!("#[implement(", stringify!($($implement_of)*) ,")]")])+
57            #[doc = "struct MyStruct {"]
58            #[doc = concat!("    slot: ", stringify!($($slot_ty)*))]
59            #[doc = "}"]
60            #[doc = "```"]
61        )?
62        $(
63            #[doc = ""]
64            #[doc = $doc1]
65        )*
66        pub trait $trait_name $(< $($trait_params)+>)? $(:$($supertraits)*)?
67        $(where $($where_clause)*)?
68        {$($trait_contents)*}
69        emit_traits!{ $($t)* }
70    };
71}
72use emit_traits;
73
74pub trait Repeater<const TRAIT_ID: u64, const NTH: usize, T: ?Sized> {
75    type Type: ?Sized;
76}