1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
trait Test { type Test; fn test() -> Self::Test; } #[auto_tuple_traits::impl_for_tuples(2)] impl Test for Tuple { for_tuples!( type Test = ( #( Tuple::Test ),* ); ); fn test() -> Self::Test { for_tuples!( ( #( Tuple.test() ),* ) ) } } fn main() {}