Debian Codegraph @

gcc/testsuite/rust/compile/torture/traits3.rs

raw
1 #[lang = "sized"]
2 pub trait Sized {}
3
4 pub trait Foo {
5 fn Bar(self) -> i32;
6 }
7
8 struct Baz;
9 // { dg-warning "struct is never constructed: .Baz." "" { target *-*-* } .-1 }
10
11 impl Foo for Baz {
12 fn Bar(self) -> i32 {
13 // { dg-warning "unused name .self." "" { target *-*-* } .-1 }
14 123
15 }
16 }
17
18 fn main() {}