1 2 3 4 5 6 7 8 9 10 11
/// Bulk implementation of a trait. macro_rules! impl_all { (impl<$lt:lifetime> $tr:ty: $($t:ty),* $(,)? => $body:tt) => { $(impl<$lt> $tr for $t $body)* }; ($tr:ty: $($t:ty),* $(,)? => $body:tt) => { $(impl $tr for $t $body)* }; } pub(crate) use impl_all;