1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#[lang = "sized"] pub trait Sized {} struct Foo(u32); // { dg-warning "struct is never constructed" "" { target *-*-* } .-1 } pub trait Bar { fn bar(self); } impl Foo { pub fn map<F>(f: F) where F: Bar, { f.bar(); } }