summaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/struct_init_5.rs
blob: 891f64540fe9288e96907888a4478e104893fe57 (plain)
1
2
3
4
5
6
7
8
9
10
struct Foo {
    a: i32,
    b: i32,
}

fn main() {
    let a = Foo { a: 1, b: 2 };
    let b = Foo { ..a };
    // { dg-warning "unused name" "" { target *-*-* } .-1 }
}