// Minimized case from typenum that didn't compile because: // - We tried to normalize the ParamEnv of the second impl // - This requires trying to normalize `GrEq>>` // - This requires proving `Square>: Sized` so that the first impl // applies // - This requires Providing `Square>` is well-formed, so that we // can use the `Sized` bound on `Mul::Output` // - This requires proving `Square: Mul` // - But first we tried normalizing the whole obligation, including the // ParamEnv, which leads to a cycle error. // check-pass trait PrivateSquareRoot {} pub trait Mul { type Output; } pub trait IsGreaterOrEqual { type Output; } pub type Square = ::Output; pub type GrEq = >::Output; impl IsGreaterOrEqual for A { type Output = (); } impl PrivateSquareRoot for U where U: Mul, Square: Mul, GrEq>>: Sized, { } fn main() {}