#[lang = "sized"] pub trait Sized {} struct Foo { a: T, // { dg-warning "field is never read" "" { target *-*-* } .-1 } b: bool, // { dg-warning "field is never read" "" { target *-*-* } .-1 } } fn test(a: T) -> Foo { Foo { a: a, b: true } } fn main() { let a: Foo = test(123); // { dg-warning "unused name" "" { target *-*-* } .-1 } let b: Foo = test(456); // { dg-warning "unused name" "" { target *-*-* } .-1 } }