@@ -43,27 +43,17 @@ use crate::hash::Hasher;
4343/// ```
4444#[ unstable( feature = "internal_impls_macro" , issue = "none" ) ]
4545macro marker_impls {
46- ( $( #[ $( $meta: tt) * ] ) * $Trait: ident for $( $( { $( $bounds: tt) * } ) ? $T: ty ) , + $( , ) ?) => {
47- // This inner macro is needed because... idk macros are weird.
48- // It allows repeating `meta` on all impls.
49- #[ unstable( feature = "internal_impls_macro" , issue = "none" ) ]
50- macro _impl {
51- ( $$( { $$( $$bounds_: tt) * } ) ? $$T_: ty ) => {
52- $( #[ $( $meta) * ] ) * impl<$$( $$( $$bounds_) * ) ?> $Trait for $$T_ { }
53- }
54- }
55- $( _impl ! { $( { $( $bounds) * } ) ? $T } ) +
46+ ( $( #[ $( $meta: tt) * ] ) * $Trait: ident for $( { $( $bounds: tt) * } ) ? $T: ty $( , $( $rest: tt) * ) ? ) => {
47+ $( #[ $( $meta) * ] ) * impl< $( $( $bounds) * ) ? > $Trait for $T { }
48+ marker_impls ! { $( #[ $( $meta) * ] ) * $Trait for $( $( $rest) * ) ? }
5649 } ,
57- ( $( #[ $( $meta: tt) * ] ) * unsafe $Trait: ident for $( $( { $( $bounds: tt) * } ) ? $T: ty ) , + $( , ) ?) => {
58- #[ unstable( feature = "internal_impls_macro" , issue = "none" ) ]
59- macro _impl {
60- ( $$( { $$( $$bounds_: tt) * } ) ? $$T_: ty ) => {
61- $( #[ $( $meta) * ] ) * unsafe impl <$$( $$( $$bounds_) * ) ?> $Trait for $$T_ { }
62- }
63- }
50+ ( $( #[ $( $meta: tt) * ] ) * $Trait: ident for ) => { } ,
6451
65- $( _impl ! { $( { $( $bounds) * } ) ? $T } ) +
52+ ( $( #[ $( $meta: tt) * ] ) * unsafe $Trait: ident for $( { $( $bounds: tt) * } ) ? $T: ty $( , $( $rest: tt) * ) ? ) => {
53+ $( #[ $( $meta) * ] ) * unsafe impl< $( $( $bounds) * ) ? > $Trait for $T { }
54+ marker_impls ! { $( #[ $( $meta) * ] ) * unsafe $Trait for $( $( $rest) * ) ? }
6655 } ,
56+ ( $( #[ $( $meta: tt) * ] ) * unsafe $Trait: ident for ) => { } ,
6757}
6858
6959/// Types that can be transferred across thread boundaries.
0 commit comments