@@ -14,10 +14,12 @@ LL | struct S(i32, f32);
14
14
| ------------------- tuple struct defined here
15
15
...
16
16
LL | S(x) => {}
17
- | ^^^-
18
- | | |
19
- | | help: use `_` to explicitly ignore each field
20
- | expected 2 fields, found 1
17
+ | ^^^^ expected 2 fields, found 1
18
+ |
19
+ help: use `_` to explicitly ignore each field
20
+ |
21
+ LL | S(x, _) => {}
22
+ | ^^^
21
23
22
24
error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 2 fields
23
25
--> $DIR/pat-tuple-underfield.rs:14:9
@@ -26,10 +28,12 @@ LL | struct S(i32, f32);
26
28
| ------------------- tuple struct defined here
27
29
...
28
30
LL | S(_) => {}
29
- | ^^^-
30
- | | |
31
- | | help: use `_` to explicitly ignore each field
32
- | expected 2 fields, found 1
31
+ | ^^^^ expected 2 fields, found 1
32
+ |
33
+ help: use `_` to explicitly ignore each field
34
+ |
35
+ LL | S(_, _) => {}
36
+ | ^^^
33
37
34
38
error[E0023]: this pattern has 0 fields, but the corresponding tuple struct has 2 fields
35
39
--> $DIR/pat-tuple-underfield.rs:19:9
@@ -56,10 +60,12 @@ LL | S(i32, f32),
56
60
| ----------- tuple variant defined here
57
61
...
58
62
LL | E::S(x) => {}
59
- | ^^^^^^-
60
- | | |
61
- | | help: use `_` to explicitly ignore each field
62
- | expected 2 fields, found 1
63
+ | ^^^^^^^ expected 2 fields, found 1
64
+ |
65
+ help: use `_` to explicitly ignore each field
66
+ |
67
+ LL | E::S(x, _) => {}
68
+ | ^^^
63
69
64
70
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
65
71
--> $DIR/pat-tuple-underfield.rs:31:9
@@ -68,10 +74,12 @@ LL | S(i32, f32),
68
74
| ----------- tuple variant defined here
69
75
...
70
76
LL | E::S(_) => {}
71
- | ^^^^^^-
72
- | | |
73
- | | help: use `_` to explicitly ignore each field
74
- | expected 2 fields, found 1
77
+ | ^^^^^^^ expected 2 fields, found 1
78
+ |
79
+ help: use `_` to explicitly ignore each field
80
+ |
81
+ LL | E::S(_, _) => {}
82
+ | ^^^
75
83
76
84
error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 2 fields
77
85
--> $DIR/pat-tuple-underfield.rs:36:9
0 commit comments