@@ -8,27 +8,31 @@ LL | E::S => {}
8
8
| ^^^^ help: use the tuple variant pattern syntax instead: `E::S(_, _)`
9
9
10
10
error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 2 fields
11
- --> $DIR/pat-tuple-underfield.rs:9:9
11
+ --> $DIR/pat-tuple-underfield.rs:9:10
12
12
|
13
13
LL | struct S(i32, f32);
14
14
| ------------------- tuple struct defined here
15
15
...
16
16
LL | S(x) => {}
17
- | ^^^^ expected 2 fields, found 1
17
+ | -^^^ expected 2 fields, found 1
18
+ | |
19
+ | this tuple struct
18
20
|
19
21
help: use `_` to explicitly ignore each field
20
22
|
21
23
LL | S(x, _) => {}
22
24
| +++
23
25
24
26
error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 2 fields
25
- --> $DIR/pat-tuple-underfield.rs:14:9
27
+ --> $DIR/pat-tuple-underfield.rs:14:10
26
28
|
27
29
LL | struct S(i32, f32);
28
30
| ------------------- tuple struct defined here
29
31
...
30
32
LL | S(_) => {}
31
- | ^^^^ expected 2 fields, found 1
33
+ | -^^^ expected 2 fields, found 1
34
+ | |
35
+ | this tuple struct
32
36
|
33
37
help: use `_` to explicitly ignore each field
34
38
|
@@ -40,13 +44,15 @@ LL | S(..) => {}
40
44
| ~~
41
45
42
46
error[E0023]: this pattern has 0 fields, but the corresponding tuple struct has 2 fields
43
- --> $DIR/pat-tuple-underfield.rs:20:9
47
+ --> $DIR/pat-tuple-underfield.rs:20:10
44
48
|
45
49
LL | struct S(i32, f32);
46
50
| ------------------- tuple struct defined here
47
51
...
48
52
LL | S() => {}
49
- | ^^^ expected 2 fields, found 0
53
+ | -^^ expected 2 fields, found 0
54
+ | |
55
+ | this tuple struct
50
56
|
51
57
help: use `_` to explicitly ignore each field
52
58
|
@@ -58,27 +64,31 @@ LL | S(..) => {}
58
64
| ++
59
65
60
66
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
61
- --> $DIR/pat-tuple-underfield.rs:27:9
67
+ --> $DIR/pat-tuple-underfield.rs:27:13
62
68
|
63
69
LL | S(i32, f32),
64
70
| ----------- tuple variant defined here
65
71
...
66
72
LL | E::S(x) => {}
67
- | ^^^^^^^ expected 2 fields, found 1
73
+ | ----^^^ expected 2 fields, found 1
74
+ | |
75
+ | this tuple variant
68
76
|
69
77
help: use `_` to explicitly ignore each field
70
78
|
71
79
LL | E::S(x, _) => {}
72
80
| +++
73
81
74
82
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
75
- --> $DIR/pat-tuple-underfield.rs:32:9
83
+ --> $DIR/pat-tuple-underfield.rs:32:13
76
84
|
77
85
LL | S(i32, f32),
78
86
| ----------- tuple variant defined here
79
87
...
80
88
LL | E::S(_) => {}
81
- | ^^^^^^^ expected 2 fields, found 1
89
+ | ----^^^ expected 2 fields, found 1
90
+ | |
91
+ | this tuple variant
82
92
|
83
93
help: use `_` to explicitly ignore each field
84
94
|
@@ -90,13 +100,15 @@ LL | E::S(..) => {}
90
100
| ~~
91
101
92
102
error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 2 fields
93
- --> $DIR/pat-tuple-underfield.rs:38:9
103
+ --> $DIR/pat-tuple-underfield.rs:38:13
94
104
|
95
105
LL | S(i32, f32),
96
106
| ----------- tuple variant defined here
97
107
...
98
108
LL | E::S() => {}
99
- | ^^^^^^ expected 2 fields, found 0
109
+ | ----^^ expected 2 fields, found 0
110
+ | |
111
+ | this tuple variant
100
112
|
101
113
help: use `_` to explicitly ignore each field
102
114
|
@@ -108,13 +120,15 @@ LL | E::S(..) => {}
108
120
| ++
109
121
110
122
error[E0023]: this pattern has 2 fields, but the corresponding tuple struct has 4 fields
111
- --> $DIR/pat-tuple-underfield.rs:50:9
123
+ --> $DIR/pat-tuple-underfield.rs:50:15
112
124
|
113
125
LL | struct Point4(i32, i32, i32, i32);
114
126
| ---------------------------------- tuple struct defined here
115
127
...
116
128
LL | Point4( a , _ ) => {}
117
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 4 fields, found 2
129
+ | ------^^^^^^^^^^^^^^^^^^^^ expected 4 fields, found 2
130
+ | |
131
+ | this tuple struct
118
132
|
119
133
help: use `_` to explicitly ignore each field
120
134
|
0 commit comments