#[lang = "sized"] pub trait Sized {} struct Foo(T, bool); impl Foo { fn new() -> Self { Foo(123, true) } fn bar(self) -> i32 { self.0 } } impl Foo { fn new() -> Self { Foo(123f32, true) } fn bar(self) -> f32 { self.0 } } fn main() { let a = Foo::::new(); let aa: i32 = a.bar(); // { dg-warning "unused name" "" { target *-*-* } .-1 } let b = Foo::::new(); let bb: f32 = b.bar(); // { dg-warning "unused name" "" { target *-*-* } .-1 } }