1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#[lang = "sized"] pub trait Sized {} fn main() { struct Foo; trait Bar { fn foo(&self); } impl Bar for Foo { fn foo(&self) {} // { dg-warning "unused name" "" { target *-*-* } .-1 } } let s = Foo; s.foo(); }