Debian Codegraph @

gcc/testsuite/rust/compile/issue-2106.rs

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