@@ -71,7 +71,22 @@ LL | (Some(a), None) => bar(a),
71
71
| ^^^^^^^^^^^^^^^^^^^^^^^^^
72
72
73
73
error: this match arm has an identical body to another arm
74
- --> $DIR/match_same_arms2.rs:71:9
74
+ --> $DIR/match_same_arms2.rs:80:9
75
+ |
76
+ LL | (None, Some(a)) if a == 42 => a,
77
+ | ---------------^^^^^^^^^^^^^^^^
78
+ | |
79
+ | help: try merging the arm patterns: `(None, Some(a)) | (Some(a), None)`
80
+ |
81
+ = help: or try changing either arm body
82
+ note: other arm here
83
+ --> $DIR/match_same_arms2.rs:79:9
84
+ |
85
+ LL | (Some(a), None) if a == 42 => a,
86
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
87
+
88
+ error: this match arm has an identical body to another arm
89
+ --> $DIR/match_same_arms2.rs:85:9
75
90
|
76
91
LL | (Some(a), ..) => bar(a),
77
92
| -------------^^^^^^^^^^
@@ -80,13 +95,13 @@ LL | (Some(a), ..) => bar(a),
80
95
|
81
96
= help: or try changing either arm body
82
97
note: other arm here
83
- --> $DIR/match_same_arms2.rs:72 :9
98
+ --> $DIR/match_same_arms2.rs:86 :9
84
99
|
85
100
LL | (.., Some(a)) => bar(a),
86
101
| ^^^^^^^^^^^^^^^^^^^^^^^
87
102
88
103
error: this match arm has an identical body to another arm
89
- --> $DIR/match_same_arms2.rs:105 :9
104
+ --> $DIR/match_same_arms2.rs:119 :9
90
105
|
91
106
LL | (Ok(x), Some(_)) => println!("ok {}", x),
92
107
| ----------------^^^^^^^^^^^^^^^^^^^^^^^^
@@ -95,13 +110,13 @@ LL | (Ok(x), Some(_)) => println!("ok {}", x),
95
110
|
96
111
= help: or try changing either arm body
97
112
note: other arm here
98
- --> $DIR/match_same_arms2.rs:106 :9
113
+ --> $DIR/match_same_arms2.rs:120 :9
99
114
|
100
115
LL | (Ok(_), Some(x)) => println!("ok {}", x),
101
116
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102
117
103
118
error: this match arm has an identical body to another arm
104
- --> $DIR/match_same_arms2.rs:121 :9
119
+ --> $DIR/match_same_arms2.rs:135 :9
105
120
|
106
121
LL | Ok(_) => println!("ok"),
107
122
| -----^^^^^^^^^^^^^^^^^^
@@ -110,13 +125,13 @@ LL | Ok(_) => println!("ok"),
110
125
|
111
126
= help: or try changing either arm body
112
127
note: other arm here
113
- --> $DIR/match_same_arms2.rs:120 :9
128
+ --> $DIR/match_same_arms2.rs:134 :9
114
129
|
115
130
LL | Ok(3) => println!("ok"),
116
131
| ^^^^^^^^^^^^^^^^^^^^^^^
117
132
118
133
error: this match arm has an identical body to another arm
119
- --> $DIR/match_same_arms2.rs:148 :9
134
+ --> $DIR/match_same_arms2.rs:162 :9
120
135
|
121
136
LL | 1 => {
122
137
| ^ help: try merging the arm patterns: `1 | 0`
@@ -129,15 +144,15 @@ LL | | },
129
144
|
130
145
= help: or try changing either arm body
131
146
note: other arm here
132
- --> $DIR/match_same_arms2.rs:145 :9
147
+ --> $DIR/match_same_arms2.rs:159 :9
133
148
|
134
149
LL | / 0 => {
135
150
LL | | empty!(0);
136
151
LL | | },
137
152
| |_________^
138
153
139
154
error: match expression looks like `matches!` macro
140
- --> $DIR/match_same_arms2.rs:167 :16
155
+ --> $DIR/match_same_arms2.rs:181 :16
141
156
|
142
157
LL | let _ans = match x {
143
158
| ________________^
@@ -151,7 +166,7 @@ LL | | };
151
166
= help: to override `-D warnings` add `#[allow(clippy::match_like_matches_macro)]`
152
167
153
168
error: this match arm has an identical body to another arm
154
- --> $DIR/match_same_arms2.rs:199 :9
169
+ --> $DIR/match_same_arms2.rs:213 :9
155
170
|
156
171
LL | Foo::X(0) => 1,
157
172
| ---------^^^^^
@@ -160,13 +175,13 @@ LL | Foo::X(0) => 1,
160
175
|
161
176
= help: or try changing either arm body
162
177
note: other arm here
163
- --> $DIR/match_same_arms2.rs:201 :9
178
+ --> $DIR/match_same_arms2.rs:215 :9
164
179
|
165
180
LL | Foo::Z(_) => 1,
166
181
| ^^^^^^^^^^^^^^
167
182
168
183
error: this match arm has an identical body to another arm
169
- --> $DIR/match_same_arms2.rs:209 :9
184
+ --> $DIR/match_same_arms2.rs:223 :9
170
185
|
171
186
LL | Foo::Z(_) => 1,
172
187
| ---------^^^^^
@@ -175,13 +190,13 @@ LL | Foo::Z(_) => 1,
175
190
|
176
191
= help: or try changing either arm body
177
192
note: other arm here
178
- --> $DIR/match_same_arms2.rs:207 :9
193
+ --> $DIR/match_same_arms2.rs:221 :9
179
194
|
180
195
LL | Foo::X(0) => 1,
181
196
| ^^^^^^^^^^^^^^
182
197
183
198
error: this match arm has an identical body to another arm
184
- --> $DIR/match_same_arms2.rs:232 :9
199
+ --> $DIR/match_same_arms2.rs:246 :9
185
200
|
186
201
LL | Some(Bar { y: 0, x: 5, .. }) => 1,
187
202
| ----------------------------^^^^^
@@ -190,13 +205,13 @@ LL | Some(Bar { y: 0, x: 5, .. }) => 1,
190
205
|
191
206
= help: or try changing either arm body
192
207
note: other arm here
193
- --> $DIR/match_same_arms2.rs:229 :9
208
+ --> $DIR/match_same_arms2.rs:243 :9
194
209
|
195
210
LL | Some(Bar { x: 0, y: 5, .. }) => 1,
196
211
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
197
212
198
213
error: this match arm has an identical body to another arm
199
- --> $DIR/match_same_arms2.rs:246 :9
214
+ --> $DIR/match_same_arms2.rs:260 :9
200
215
|
201
216
LL | 1 => cfg!(not_enable),
202
217
| -^^^^^^^^^^^^^^^^^^^^
@@ -205,10 +220,10 @@ LL | 1 => cfg!(not_enable),
205
220
|
206
221
= help: or try changing either arm body
207
222
note: other arm here
208
- --> $DIR/match_same_arms2.rs:245 :9
223
+ --> $DIR/match_same_arms2.rs:259 :9
209
224
|
210
225
LL | 0 => cfg!(not_enable),
211
226
| ^^^^^^^^^^^^^^^^^^^^^
212
227
213
- error: aborting due to 13 previous errors
228
+ error: aborting due to 14 previous errors
214
229
0 commit comments