#[lang = "sized"] pub trait Sized {} trait A { type Output; fn test(self, a: &T) -> &Self::Output; } struct Foo { // { dg-warning "struct is never constructed" "" { target *-*-* } .-1 } start: T, end: T, } impl A for Foo { type Output = X; fn test(self, a: &X) -> &Self::Output { a } }