trait NotFoo {} pub trait Foo: NotFoo { type OnlyFoo; } pub trait Service { type AssocType; } pub trait ThriftService: //~^ ERROR the trait bound `Bug: Foo` is not satisfied //~| ERROR the trait bound `Bug: Foo` is not satisfied Service::OnlyFoo> { fn get_service( //~^ ERROR the trait bound `Bug: Foo` is not satisfied &self, ) -> Self::AssocType; //~^ the trait bound `Bug: Foo` is not satisfied } fn with_factory(factory: dyn ThriftService<()>) {} //~^ ERROR the trait bound `(): Foo` is not satisfied fn main() {}