summaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/unused_struct_field.rs
blob: 429b3039da4399bcd7c87f45b8c4fcc2dd2fd611 (plain)
1
2
3
4
5
6
7
8
9
struct Foo {
    one: i32,
// { dg-warning "field is never read" "" { target *-*-* } .-1 }
    two: i32
}
fn main() {
    let _a = Foo {one: 1, two: 2};
    let _b = _a.two;
}