1
1
error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E::S`
2
- --> $DIR/pat-tuple-underfield.rs:45 :9
2
+ --> $DIR/pat-tuple-underfield.rs:41 :9
3
3
|
4
4
LL | S(i32, f32),
5
5
| ----------- `E::S` defined here
@@ -14,37 +14,25 @@ LL | struct S(i32, f32);
14
14
| ------------------- tuple struct defined here
15
15
...
16
16
LL | S(x) => {}
17
- | ^^^^ expected 2 fields, found 1
18
- |
19
- help: use `_` to explicitly ignore each field
20
- |
21
- LL | S(x, _) => {}
22
- | ^^^
23
- help: use `..` to ignore the rest of the fields
24
- |
25
- LL | S(x, ..) => {}
26
- | ^^^^
17
+ | ^^^-
18
+ | | |
19
+ | | help: use `_` to explicitly ignore each field
20
+ | expected 2 fields, found 1
27
21
28
22
error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 2 fields
29
- --> $DIR/pat-tuple-underfield.rs:14 :9
23
+ --> $DIR/pat-tuple-underfield.rs:13 :9
30
24
|
31
25
LL | struct S(i32, f32);
32
26
| ------------------- tuple struct defined here
33
27
...
34
28
LL | S(_) => {}
35
- | ^^^^ expected 2 fields, found 1
36
- |
37
- help: use `_` to explicitly ignore each field
38
- |
39
- LL | S(_, _) => {}
40
- | ^^^
41
- help: use `..` to ignore all fields
42
- |
43
- LL | S(..) => {}
44
- | ^^
29
+ | ^^^-
30
+ | | |
31
+ | | help: use `_` to explicitly ignore each field
32
+ | expected 2 fields, found 1
45
33
46
34
error[E0023]: this pattern has 0 fields, but the corresponding tuple struct has 2 fields
47
- --> $DIR/pat-tuple-underfield.rs:20 :9
35
+ --> $DIR/pat-tuple-underfield.rs:18 :9
48
36
|
49
37
LL | struct S(i32, f32);
50
38
| ------------------- tuple struct defined here
@@ -62,43 +50,31 @@ LL | S(..) => {}
62
50
| ^^
63
51
64
52
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
65
- --> $DIR/pat-tuple-underfield.rs:27 :9
53
+ --> $DIR/pat-tuple-underfield.rs:25 :9
66
54
|
67
55
LL | S(i32, f32),
68
56
| ----------- tuple variant defined here
69
57
...
70
58
LL | E::S(x) => {}
71
- | ^^^^^^^ expected 2 fields, found 1
72
- |
73
- help: use `_` to explicitly ignore each field
74
- |
75
- LL | E::S(x, _) => {}
76
- | ^^^
77
- help: use `..` to ignore the rest of the fields
78
- |
79
- LL | E::S(x, ..) => {}
80
- | ^^^^
59
+ | ^^^^^^-
60
+ | | |
61
+ | | help: use `_` to explicitly ignore each field
62
+ | expected 2 fields, found 1
81
63
82
64
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields
83
- --> $DIR/pat-tuple-underfield.rs:33 :9
65
+ --> $DIR/pat-tuple-underfield.rs:30 :9
84
66
|
85
67
LL | S(i32, f32),
86
68
| ----------- tuple variant defined here
87
69
...
88
70
LL | E::S(_) => {}
89
- | ^^^^^^^ expected 2 fields, found 1
90
- |
91
- help: use `_` to explicitly ignore each field
92
- |
93
- LL | E::S(_, _) => {}
94
- | ^^^
95
- help: use `..` to ignore all fields
96
- |
97
- LL | E::S(..) => {}
98
- | ^^
71
+ | ^^^^^^-
72
+ | | |
73
+ | | help: use `_` to explicitly ignore each field
74
+ | expected 2 fields, found 1
99
75
100
76
error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 2 fields
101
- --> $DIR/pat-tuple-underfield.rs:39 :9
77
+ --> $DIR/pat-tuple-underfield.rs:35 :9
102
78
|
103
79
LL | S(i32, f32),
104
80
| ----------- tuple variant defined here
0 commit comments