]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/too-many-field-suggestions.rs
Rollup merge of #105795 - nicholasbishop:bishop-stabilize-efiapi, r=joshtriplett
[rust.git] / tests / ui / suggestions / too-many-field-suggestions.rs
1 struct Thing {
2     a0: Foo,
3     a1: Foo,
4     a2: Foo,
5     a3: Foo,
6     a4: Foo,
7     a5: Foo,
8     a6: Foo,
9     a7: Foo,
10     a8: Foo,
11     a9: Foo,
12 }
13
14 struct Foo {
15     field: Field,
16 }
17
18 struct Field;
19
20 impl Foo {
21     fn bar(&self) {}
22 }
23
24 fn bar(t: Thing) {
25     t.bar(); //~ ERROR no method named `bar` found for struct `Thing`
26     t.field; //~ ERROR no field `field` on type `Thing`
27 }
28
29 fn main() {}