//@ only-linux //@ compile-flags: --error-format=human --color=always //@ error-pattern: the trait bound trait Foo: Bar {} trait Bar {} struct Struct; impl Foo for T where T: Bar {} impl<'a> Bar<()> for Struct {} fn foo() -> impl Foo { Struct } fn main() {}