summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/too-many-field-suggestions.rs
blob: 905f9502cf5be5270b501c9eafb0714886c01a09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
struct Thing {
    a0: Foo,
    a1: Foo,
    a2: Foo,
    a3: Foo,
    a4: Foo,
    a5: Foo,
    a6: Foo,
    a7: Foo,
    a8: Foo,
    a9: Foo,
}

struct Foo {
    field: Field,
}

struct Field;

impl Foo {
    fn bar(&self) {}
}

fn bar(t: Thing) {
    t.bar(); //~ ERROR no method named `bar` found for struct `Thing`
    t.field; //~ ERROR no field `field` on type `Thing`
}

fn main() {}