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