macro_rules! trait_alias { ( $(#[$attr: meta])* $visibility: vis $name: ident$(<$($type_param: ident),*>)?$(: $first_bound: tt $(+ $bound: tt)*)?; ) => { $(#[$attr])* $visibility trait $name $(<$($type_param),*>)? $(: $first_bound $(+ $bound)*)? {} impl $name$(<$($type_param),*>)? for T {} }; } macro_rules! feature_alternate { ( feature = $feature: literal, $(#[doc = $doc: literal])* when_enabled = $when_enabled: item, when_disabled = $when_disabled: item ) => { $(#[doc = $doc])* #[cfg(feature = $feature)] $when_enabled $(#[doc = $doc])* #[cfg(not(feature = $feature))] $when_disabled }; } pub(crate) use {feature_alternate, trait_alias};