//@ compile-flags: -Znext-solver //@ check-pass // A regression test for trait-system-refactor-initiative#109. // Unlike `rayon-hang-1.rs` the cycles in this test are not // unproductive, which causes the `AliasRelate` goal when trying // to apply where-clauses to only error in the second iteration. // // This makes the exponential blowup to be significantly harder // to avoid. trait ParallelIterator: Sized { type Item; } trait IntoParallelIteratorIndir { type Iter: ParallelIterator; type Item; } impl IntoParallelIteratorIndir for I where Box: IntoParallelIterator, { type Iter = as IntoParallelIterator>::Iter; type Item = as IntoParallelIterator>::Item; } trait IntoParallelIterator { type Iter: ParallelIterator; type Item; } impl IntoParallelIterator for T { type Iter = T; type Item = T::Item; } macro_rules! multizip_impls { ($($T:ident),+) => { fn foo<'a, $( $T, )+>() where $( $T: IntoParallelIteratorIndir, $T::Iter: ParallelIterator, )+ {} } } multizip_impls! { A, B, C, D, E, F, G, H, I, J, K, L } fn main() {}