2021-10-28 00:58:23 +00:00
|
|
|
error: pattern requires `..` due to inaccessible fields
|
2021-12-06 21:17:22 +00:00
|
|
|
--> $DIR/doc-hidden-fields.rs:15:9
|
2021-10-28 00:58:23 +00:00
|
|
|
|
|
2022-03-12 20:38:44 +00:00
|
|
|
LL | let HiddenStruct { one, two } = HiddenStruct::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-10-28 00:58:23 +00:00
|
|
|
|
|
|
|
|
help: ignore the inaccessible and unused fields
|
|
|
|
|
|
2022-03-12 20:38:44 +00:00
|
|
|
LL | let HiddenStruct { one, two, .. } = HiddenStruct::default();
|
2021-10-28 00:58:23 +00:00
|
|
|
| ++++
|
|
|
|
|
|
|
|
error[E0027]: pattern does not mention field `two` and inaccessible fields
|
2021-12-06 21:17:22 +00:00
|
|
|
--> $DIR/doc-hidden-fields.rs:18:9
|
2021-10-28 00:58:23 +00:00
|
|
|
|
|
2022-03-12 20:38:44 +00:00
|
|
|
LL | let HiddenStruct { one } = HiddenStruct::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ missing field `two` and inaccessible fields
|
2021-10-28 00:58:23 +00:00
|
|
|
|
|
|
|
|
help: include the missing field in the pattern and ignore the inaccessible fields
|
|
|
|
|
|
2025-02-13 03:07:18 +00:00
|
|
|
LL | let HiddenStruct { one, two, .. } = HiddenStruct::default();
|
2025-02-13 03:21:25 +00:00
|
|
|
| +++++++++
|
2021-10-28 00:58:23 +00:00
|
|
|
help: if you don't care about this missing field, you can explicitly ignore it
|
|
|
|
|
|
2025-02-13 03:07:18 +00:00
|
|
|
LL | let HiddenStruct { one, two: _, .. } = HiddenStruct::default();
|
2025-02-13 03:21:25 +00:00
|
|
|
| ++++++++++++
|
2024-10-22 05:51:54 +00:00
|
|
|
help: or always ignore missing fields here
|
|
|
|
|
|
2025-02-13 03:07:18 +00:00
|
|
|
LL | let HiddenStruct { one, .. } = HiddenStruct::default();
|
2025-02-13 03:21:25 +00:00
|
|
|
| ++++
|
2021-10-28 00:58:23 +00:00
|
|
|
|
|
|
|
error[E0027]: pattern does not mention field `two`
|
2021-12-06 21:17:22 +00:00
|
|
|
--> $DIR/doc-hidden-fields.rs:21:9
|
2021-10-28 00:58:23 +00:00
|
|
|
|
|
|
|
|
LL | let HiddenStruct { one, hide } = HiddenStruct::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ missing field `two`
|
|
|
|
|
|
|
|
|
help: include the missing field in the pattern
|
|
|
|
|
|
2025-02-13 03:07:18 +00:00
|
|
|
LL | let HiddenStruct { one, hide, two } = HiddenStruct::default();
|
2025-02-13 03:21:25 +00:00
|
|
|
| +++++
|
2021-10-28 00:58:23 +00:00
|
|
|
help: if you don't care about this missing field, you can explicitly ignore it
|
|
|
|
|
|
2025-02-13 03:07:18 +00:00
|
|
|
LL | let HiddenStruct { one, hide, two: _ } = HiddenStruct::default();
|
2025-02-13 03:21:25 +00:00
|
|
|
| ++++++++
|
2024-10-22 05:51:54 +00:00
|
|
|
help: or always ignore missing fields here
|
|
|
|
|
|
2025-02-13 03:07:18 +00:00
|
|
|
LL | let HiddenStruct { one, hide, .. } = HiddenStruct::default();
|
2025-02-13 03:21:25 +00:00
|
|
|
| ++++
|
2021-10-28 00:58:23 +00:00
|
|
|
|
2021-12-06 21:17:22 +00:00
|
|
|
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
|
|
|
|
|
|
2025-02-13 03:07:18 +00:00
|
|
|
LL | let InCrate { a, b, im_hidden } = InCrate { a: 0, b: false, im_hidden: 0 };
|
2025-02-13 03:21:25 +00:00
|
|
|
| +++++++++++
|
2021-12-06 21:17:22 +00:00
|
|
|
help: if you don't care about this missing field, you can explicitly ignore it
|
|
|
|
|
|
2025-02-13 03:07:18 +00:00
|
|
|
LL | let InCrate { a, b, im_hidden: _ } = InCrate { a: 0, b: false, im_hidden: 0 };
|
2025-02-13 03:21:25 +00:00
|
|
|
| ++++++++++++++
|
2024-10-22 05:51:54 +00:00
|
|
|
help: or always ignore missing fields here
|
|
|
|
|
|
2025-02-13 03:07:18 +00:00
|
|
|
LL | let InCrate { a, b, .. } = InCrate { a: 0, b: false, im_hidden: 0 };
|
2025-02-13 03:21:25 +00:00
|
|
|
| ++++
|
2021-12-06 21:17:22 +00:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
2021-10-28 00:58:23 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0027`.
|