#[lang = "sized"] pub trait Sized {} trait A { type Output; fn test(self, a: &T) -> &Self::Output; } struct Foo { start: T, end: T, } impl A for Foo { // { dg-error "generic item takes at least 2 type arguments but 1 were supplied" "" { target *-*-* } .-1 } // { dg-error "unconstrained type parameter" "" { target *-*-* } .-2 } type Output = T; fn test(self, a: &T) -> &Self::Output { a } }