@@ -71,7 +71,22 @@ LL | (Some(a), None) => bar(a),
7171 | ^^^^^^^^^^^^^^^^^^^^^^^^^
7272
7373error: 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
7590 |
7691LL | (Some(a), ..) => bar(a),
7792 | -------------^^^^^^^^^^
@@ -80,13 +95,13 @@ LL | (Some(a), ..) => bar(a),
8095 |
8196 = help: or try changing either arm body
8297note: other arm here
83-  --> tests/ui/match_same_arms2.rs:72 :9
98+  --> tests/ui/match_same_arms2.rs:86 :9
8499 |
85100LL | (.., Some(a)) => bar(a),
86101 | ^^^^^^^^^^^^^^^^^^^^^^^
87102
88103error: 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
90105 |
91106LL | (Ok(x), Some(_)) => println!("ok {}", x),
92107 | ----------------^^^^^^^^^^^^^^^^^^^^^^^^
@@ -95,13 +110,13 @@ LL | (Ok(x), Some(_)) => println!("ok {}", x),
95110 |
96111 = help: or try changing either arm body
97112note: other arm here
98-  --> tests/ui/match_same_arms2.rs:106 :9
113+  --> tests/ui/match_same_arms2.rs:120 :9
99114 |
100115LL | (Ok(_), Some(x)) => println!("ok {}", x),
101116 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102117
103118error: 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
105120 |
106121LL | Ok(_) => println!("ok"),
107122 | -----^^^^^^^^^^^^^^^^^^
@@ -110,13 +125,13 @@ LL | Ok(_) => println!("ok"),
110125 |
111126 = help: or try changing either arm body
112127note: other arm here
113-  --> tests/ui/match_same_arms2.rs:120 :9
128+  --> tests/ui/match_same_arms2.rs:134 :9
114129 |
115130LL | Ok(3) => println!("ok"),
116131 | ^^^^^^^^^^^^^^^^^^^^^^^
117132
118133error: 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
120135 |
121136LL | 1 => {
122137 | ^ help: try merging the arm patterns: `1 | 0`
@@ -128,15 +143,15 @@ LL | | },
128143 |
129144 = help: or try changing either arm body
130145note: other arm here
131-  --> tests/ui/match_same_arms2.rs:145 :9
146+  --> tests/ui/match_same_arms2.rs:159 :9
132147 |
133148LL | / 0 => {
134149LL | | empty!(0);
135150LL | | },
136151 | |_________^
137152
138153error: match expression looks like `matches!` macro
139-  --> tests/ui/match_same_arms2.rs:167 :16
154+  --> tests/ui/match_same_arms2.rs:181 :16
140155 |
141156LL | let _ans = match x {
142157 | ________________^
@@ -150,7 +165,7 @@ LL | | };
150165 = help: to override `-D warnings` add `#[allow(clippy::match_like_matches_macro)]`
151166
152167error: 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
154169 |
155170LL | Foo::X(0) => 1,
156171 | ---------^^^^^
@@ -159,13 +174,13 @@ LL | Foo::X(0) => 1,
159174 |
160175 = help: or try changing either arm body
161176note: other arm here
162-  --> tests/ui/match_same_arms2.rs:201 :9
177+  --> tests/ui/match_same_arms2.rs:215 :9
163178 |
164179LL | Foo::Z(_) => 1,
165180 | ^^^^^^^^^^^^^^
166181
167182error: 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
169184 |
170185LL | Foo::Z(_) => 1,
171186 | ---------^^^^^
@@ -174,13 +189,13 @@ LL | Foo::Z(_) => 1,
174189 |
175190 = help: or try changing either arm body
176191note: other arm here
177-  --> tests/ui/match_same_arms2.rs:207 :9
192+  --> tests/ui/match_same_arms2.rs:221 :9
178193 |
179194LL | Foo::X(0) => 1,
180195 | ^^^^^^^^^^^^^^
181196
182197error: 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
184199 |
185200LL | Some(Bar { y: 0, x: 5, .. }) => 1,
186201 | ----------------------------^^^^^
@@ -189,13 +204,13 @@ LL | Some(Bar { y: 0, x: 5, .. }) => 1,
189204 |
190205 = help: or try changing either arm body
191206note: other arm here
192-  --> tests/ui/match_same_arms2.rs:229 :9
207+  --> tests/ui/match_same_arms2.rs:243 :9
193208 |
194209LL | Some(Bar { x: 0, y: 5, .. }) => 1,
195210 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
196211
197212error: 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
199214 |
200215LL | 1 => cfg!(not_enable),
201216 | -^^^^^^^^^^^^^^^^^^^^
@@ -204,10 +219,10 @@ LL | 1 => cfg!(not_enable),
204219 |
205220 = help: or try changing either arm body
206221note: other arm here
207-  --> tests/ui/match_same_arms2.rs:245 :9
222+  --> tests/ui/match_same_arms2.rs:259 :9
208223 |
209224LL | 0 => cfg!(not_enable),
210225 | ^^^^^^^^^^^^^^^^^^^^^
211226
212- error: aborting due to 13  previous errors
227+ error: aborting due to 14  previous errors
213228
0 commit comments