about summary refs log tree commit diff
path: root/src/test/ui/missing/missing-fields-in-struct-pattern.stderr
blob: f7037468996f43c296692a92fb98af24d3e81376 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
error[E0026]: struct `S` does not have fields named `a`, `b`, `c`, `d`
  --> $DIR/missing-fields-in-struct-pattern.rs:4:16
   |
LL |     if let S { a, b, c, d } = S(1, 2, 3, 4) {
   |                ^  ^  ^  ^ struct `S` does not have these fields

error[E0027]: pattern does not mention fields `0`, `1`, `2`, `3`
  --> $DIR/missing-fields-in-struct-pattern.rs:4: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 have detailed explanations: E0026, E0027.
For more information about an error, try `rustc --explain E0026`.