2018-12-16 21:21:47 -06:00
|
|
|
error[E0609]: no field `d` on type `&A`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/struct-pat-derived-error.rs:8:31
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let A { x, y } = self.d;
|
2019-09-28 06:39:19 -05:00
|
|
|
| ^ help: a field with a similar name exists: `b`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2018-12-16 21:21:47 -06:00
|
|
|
error[E0026]: struct `A` does not have fields named `x`, `y`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/struct-pat-derived-error.rs:8:17
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let A { x, y } = self.d;
|
2018-12-16 21:21:47 -06:00
|
|
|
| ^ ^ struct `A` does not have these fields
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0027]: pattern does not mention fields `b`, `c`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/struct-pat-derived-error.rs:8:13
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let A { x, y } = self.d;
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^^^^^ missing fields `b`, `c`
|
2020-09-11 15:47:33 -05:00
|
|
|
|
|
|
|
|
help: include the missing fields in the pattern
|
|
|
|
|
|
|
|
|
LL | let A { x, y, b, c } = self.d;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~
|
2020-11-05 21:55:58 -06:00
|
|
|
help: if you don't care about these missing fields, you can explicitly ignore them
|
2020-09-11 15:47:33 -05:00
|
|
|
|
|
|
|
|
LL | let A { x, y, .. } = self.d;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
2019-04-17 12:26:38 -05:00
|
|
|
Some errors have detailed explanations: E0026, E0027, E0609.
|
2018-08-08 07:28:26 -05:00
|
|
|
For more information about an error, try `rustc --explain E0026`.
|