aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/nonexistent-field.rs
blob: e20c49d3ebf4e8bf0fe8e3ce566c88d2001c7ba1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![allow(unused)]
fn main() {
    struct StructWithFields {
        x: u32,
    }

    let s = StructWithFields { x: 0 };
    s.foo;
    // { dg-error "no field .foo. on type .StructWithFields.StructWithFields .x.u32... .E0609." "" { target *-*-* } .-1 }

    let numbers = (1, 2, 3);
    numbers.3;
    // { dg-error "no field .3. on type ..<integer>, <integer>, <integer>.. .E0609." "" { target *-*-* } .-1 }
}