aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/struct_init1.rs
blob: 1875fb4f33ee2c40d22c7fa0aafa573c42322bff (plain)
1
2
3
4
5
6
7
8
9
10
struct Foo {
    a: f32,
    b: f32,
}

fn main() {
    let a = Foo { 0: 10.0, 1: 20.0 }; // { dg-error "failed to resolve type for field" }
    // { dg-error "unknown field" "" { target *-*-* } .-1 }
    // { dg-prune-output "compilation terminated" }
}