Debian Codegraph @

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

raw
1 #[lang = "sized"]
2 pub trait Sized {}
3
4 trait Foo {
5 const A: i32;
6
7 fn test(self);
8 }
9
10 struct Bar;
11 impl Foo for Bar {
12 const A: i32 = 123;
13 // { dg-warning "unused name" "" { target *-*-* } .-1 }
14
15 fn test(self) {}
16 // { dg-warning "unused name" "" { target *-*-* } .-1 }
17 }
18
19 fn main() {
20 let a = Bar;
21 a.test();
22 }