//@ check-pass // Regression test for #128887. #![allow(unconditional_recursion)] trait Mappable { type Output; } trait Bound {} // Deleting this impl made it compile on beta impl Bound for T {} trait Generic {} // Deleting the `: Mappable` already made it error on stable. struct IndexWithIter, T>(I, M, T); impl IndexWithIter where >::Output: Bound, // Flipping these where bounds causes this to succeed, even when removing // the where-clause on the struct definition. M: Mappable, I: Generic, { fn new(x: I) { IndexWithIter::<_, _, _>::new(x); } } fn main() {}