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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
error: pattern requires `..` due to inaccessible fields
--> $DIR/doc-hidden-fields.rs:15:9
|
LL | let HiddenStruct { one, two } = HiddenStruct::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: ignore the inaccessible and unused fields
|
LL | let HiddenStruct { one, two, .. } = HiddenStruct::default();
| ++++
error[E0027]: pattern does not mention field `two` and inaccessible fields
--> $DIR/doc-hidden-fields.rs:18:9
|
LL | let HiddenStruct { one } = HiddenStruct::default();
| ^^^^^^^^^^^^^^^^^^^^ missing field `two` and inaccessible fields
|
help: include the missing field in the pattern and ignore the inaccessible fields
|
LL | let HiddenStruct { one, two, .. } = HiddenStruct::default();
| ~~~~~~~~~~~
help: if you don't care about this missing field, you can explicitly ignore it
|
LL | let HiddenStruct { one, .. } = HiddenStruct::default();
| ~~~~~~
error[E0027]: pattern does not mention field `two`
--> $DIR/doc-hidden-fields.rs:21:9
|
LL | let HiddenStruct { one, hide } = HiddenStruct::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ missing field `two`
|
help: include the missing field in the pattern
|
LL | let HiddenStruct { one, hide, two } = HiddenStruct::default();
| ~~~~~~~
help: if you don't care about this missing field, you can explicitly ignore it
|
LL | let HiddenStruct { one, hide, .. } = HiddenStruct::default();
| ~~~~~~
error[E0027]: pattern does not mention field `im_hidden`
--> $DIR/doc-hidden-fields.rs:24:9
|
LL | let InCrate { a, b } = InCrate { a: 0, b: false, im_hidden: 0 };
| ^^^^^^^^^^^^^^^^ missing field `im_hidden`
|
help: include the missing field in the pattern
|
LL | let InCrate { a, b, im_hidden } = InCrate { a: 0, b: false, im_hidden: 0 };
| ~~~~~~~~~~~~~
help: if you don't care about this missing field, you can explicitly ignore it
|
LL | let InCrate { a, b, .. } = InCrate { a: 0, b: false, im_hidden: 0 };
| ~~~~~~
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0027`.
|