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