blob: e8e5ca69c3d697dc68dd8a195a5eb9f2f8987648 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
struct Foo<T>(T);
struct Bar {
a: Foo<i32>,
b: bool,
// { dg-warning "field is never read" "" { target *-*-* } .-1 }
}
fn main() {
let a = Foo::<i32>(123);
let b: Bar = Bar { a: a, b: true };
let c: i32 = b.a.0;
// { dg-warning "unused name" "" { target *-*-* } .-1 }
}
|