@@ -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
- --> tests/ui/match_same_arms2.rs:71:9
74
+ --> tests/ui/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
+ --> tests/ui/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
+ --> tests/ui/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
- --> tests/ui/match_same_arms2.rs:72 :9
98
+ --> tests/ui/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
- --> tests/ui/match_same_arms2.rs:105 :9
104
+ --> tests/ui/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
- --> tests/ui/match_same_arms2.rs:106 :9
113
+ --> tests/ui/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
- --> tests/ui/match_same_arms2.rs:121 :9
119
+ --> tests/ui/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
- --> tests/ui/match_same_arms2.rs:120 :9
128
+ --> tests/ui/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
- --> tests/ui/match_same_arms2.rs:148 :9
134
+ --> tests/ui/match_same_arms2.rs:162 :9
120
135
|
121
136
LL | 1 => {
122
137
| ^ help: try merging the arm patterns: `1 | 0`
@@ -128,15 +143,15 @@ LL | | },
128
143
|
129
144
= help: or try changing either arm body
130
145
note: other arm here
131
- --> tests/ui/match_same_arms2.rs:145 :9
146
+ --> tests/ui/match_same_arms2.rs:159 :9
132
147
|
133
148
LL | / 0 => {
134
149
LL | | empty!(0);
135
150
LL | | },
136
151
| |_________^
137
152
138
153
error: match expression looks like `matches!` macro
139
- --> tests/ui/match_same_arms2.rs:167 :16
154
+ --> tests/ui/match_same_arms2.rs:181 :16
140
155
|
141
156
LL | let _ans = match x {
142
157
| ________________^
@@ -150,7 +165,7 @@ LL | | };
150
165
= help: to override `-D warnings` add `#[allow(clippy::match_like_matches_macro)]`
151
166
152
167
error: this match arm has an identical body to another arm
153
- --> tests/ui/match_same_arms2.rs:199 :9
168
+ --> tests/ui/match_same_arms2.rs:213 :9
154
169
|
155
170
LL | Foo::X(0) => 1,
156
171
| ---------^^^^^
@@ -159,13 +174,13 @@ LL | Foo::X(0) => 1,
159
174
|
160
175
= help: or try changing either arm body
161
176
note: other arm here
162
- --> tests/ui/match_same_arms2.rs:201 :9
177
+ --> tests/ui/match_same_arms2.rs:215 :9
163
178
|
164
179
LL | Foo::Z(_) => 1,
165
180
| ^^^^^^^^^^^^^^
166
181
167
182
error: this match arm has an identical body to another arm
168
- --> tests/ui/match_same_arms2.rs:209 :9
183
+ --> tests/ui/match_same_arms2.rs:223 :9
169
184
|
170
185
LL | Foo::Z(_) => 1,
171
186
| ---------^^^^^
@@ -174,13 +189,13 @@ LL | Foo::Z(_) => 1,
174
189
|
175
190
= help: or try changing either arm body
176
191
note: other arm here
177
- --> tests/ui/match_same_arms2.rs:207 :9
192
+ --> tests/ui/match_same_arms2.rs:221 :9
178
193
|
179
194
LL | Foo::X(0) => 1,
180
195
| ^^^^^^^^^^^^^^
181
196
182
197
error: this match arm has an identical body to another arm
183
- --> tests/ui/match_same_arms2.rs:232 :9
198
+ --> tests/ui/match_same_arms2.rs:246 :9
184
199
|
185
200
LL | Some(Bar { y: 0, x: 5, .. }) => 1,
186
201
| ----------------------------^^^^^
@@ -189,13 +204,13 @@ LL | Some(Bar { y: 0, x: 5, .. }) => 1,
189
204
|
190
205
= help: or try changing either arm body
191
206
note: other arm here
192
- --> tests/ui/match_same_arms2.rs:229 :9
207
+ --> tests/ui/match_same_arms2.rs:243 :9
193
208
|
194
209
LL | Some(Bar { x: 0, y: 5, .. }) => 1,
195
210
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
196
211
197
212
error: this match arm has an identical body to another arm
198
- --> tests/ui/match_same_arms2.rs:246 :9
213
+ --> tests/ui/match_same_arms2.rs:260 :9
199
214
|
200
215
LL | 1 => cfg!(not_enable),
201
216
| -^^^^^^^^^^^^^^^^^^^^
@@ -204,10 +219,10 @@ LL | 1 => cfg!(not_enable),
204
219
|
205
220
= help: or try changing either arm body
206
221
note: other arm here
207
- --> tests/ui/match_same_arms2.rs:245 :9
222
+ --> tests/ui/match_same_arms2.rs:259 :9
208
223
|
209
224
LL | 0 => cfg!(not_enable),
210
225
| ^^^^^^^^^^^^^^^^^^^^^
211
226
212
- error: aborting due to 13 previous errors
227
+ error: aborting due to 14 previous errors
213
228
0 commit comments