blob: 7bc3384ab412d4274fdea80dc677f8a17a43a5e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
trait Foo {
const A: i32;
fn test(self);
}
struct Bar;
impl Foo for Bar {
const A: i32 = 123;
// { dg-warning "unused name" "" { target *-*-* } .-1 }
fn test(self) {}
// { dg-warning "unused name" "" { target *-*-* } .-1 }
}
fn main() {
let a = Bar;
a.test();
}
|