// Regression test for issue #121898. trait Base { type Base; } trait Functor: Base { fn fmap(self, f: impl Fn(A) -> B) -> Self::Base where Self::Base: Functor; } fn fmap2(input: T, f1: impl Fn(A) -> B, f2: impl Fn(B) -> C) -> T::Base where T: Functor, T::Base: Functor = T::Base>, { input.fmap(f1).fmap(f2) //~^ ERROR the trait bound `::Base: Functor` is not satisfied } fn main() {}