2018-03-18 23:26:57 -07:00
|
|
|
error[E0026]: struct `S` does not have fields named `a`, `b`, `c`, `d`
|
|
|
|
--> $DIR/missing-fields-in-struct-pattern.rs:14:16
|
|
|
|
|
|
|
|
|
LL | if let S { a, b, c, d } = S(1, 2, 3, 4) {
|
2018-03-19 14:13:57 -07:00
|
|
|
| ^ ^ ^ ^ struct `S` does not have these fields
|
2018-03-18 23:26:57 -07:00
|
|
|
|
|
|
|
error[E0027]: pattern does not mention fields `0`, `1`, `2`, `3`
|
|
|
|
--> $DIR/missing-fields-in-struct-pattern.rs:14:12
|
|
|
|
|
|
|
|
|
LL | if let S { a, b, c, d } = S(1, 2, 3, 4) {
|
|
|
|
| ^^^^^^^^^^^^^^^^ missing fields `0`, `1`, `2`, `3`
|
|
|
|
|
|
|
|
|
= note: trying to match a tuple variant with a struct variant pattern
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
Some errors occurred: E0026, E0027.
|
|
|
|
For more information about an error, try `rustc --explain E0026`.
|