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