blob: c16a67c4dd559ba179098101e07fe53ec0ddaf0d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
struct Foo<T>(T, bool);
impl Foo<i32> {
fn bar(self) -> i32 {
self.0
}
}
impl Foo<f32> {
fn bar(self) -> f32 {
self.0
}
}
fn main() {
let a = Foo(123, true);
let aa = a.bar();
// { dg-warning "unused name" "" { target *-*-* } .-1 }
let b = Foo(456f32, true);
let bb = b.bar();
// { dg-warning "unused name" "" { target *-*-* } .-1 }
}
|