@@ -204,8 +204,17 @@ LL | | None | Some(_) => {},
204204LL | | }
205205 | |_____^ help: try: `if let Some(A | B) = &Some(A) { println!() }`
206206
207+ error: you seem to be trying to use `match` for an equality check. Consider using `if`
208+ --> tests/ui/single_match.rs:365:5
209+ |
210+ LL | / match &s[0..3] {
211+ LL | | b"foo" => println!(),
212+ LL | | _ => {},
213+ LL | | }
214+ | |_____^ help: try: `if &s[0..3] == b"foo" { println!() }`
215+
207216error: this pattern is irrefutable, `match` is useless
208- --> tests/ui/single_match.rs:371 :5
217+ --> tests/ui/single_match.rs:378 :5
209218 |
210219LL | / match DATA {
211220LL | | DATA => println!(),
@@ -214,7 +223,7 @@ LL | | }
214223 | |_____^ help: try: `println!();`
215224
216225error: this pattern is irrefutable, `match` is useless
217- --> tests/ui/single_match.rs:376 :5
226+ --> tests/ui/single_match.rs:383 :5
218227 |
219228LL | / match CONST_I32 {
220229LL | | CONST_I32 => println!(),
@@ -223,7 +232,7 @@ LL | | }
223232 | |_____^ help: try: `println!();`
224233
225234error: this pattern is irrefutable, `match` is useless
226- --> tests/ui/single_match.rs:382 :5
235+ --> tests/ui/single_match.rs:389 :5
227236 |
228237LL | / match i {
229238LL | | i => {
@@ -243,7 +252,7 @@ LL + }
243252 |
244253
245254error: this pattern is irrefutable, `match` is useless
246- --> tests/ui/single_match.rs:390 :5
255+ --> tests/ui/single_match.rs:397 :5
247256 |
248257LL | / match i {
249258LL | | i => {},
@@ -252,7 +261,7 @@ LL | | }
252261 | |_____^ help: `match` expression can be removed
253262
254263error: this pattern is irrefutable, `match` is useless
255- --> tests/ui/single_match.rs:395 :5
264+ --> tests/ui/single_match.rs:402 :5
256265 |
257266LL | / match i {
258267LL | | i => (),
@@ -261,13 +270,13 @@ LL | | }
261270 | |_____^ help: `match` expression can be removed
262271
263272error: this pattern is irrefutable, `match` is useless
264- --> tests/ui/single_match.rs:400 :5
273+ --> tests/ui/single_match.rs:407 :5
265274 |
266275LL | / match CONST_I32 {
267276LL | | CONST_I32 => println!(),
268277LL | | _ => {},
269278LL | | }
270279 | |_____^ help: try: `println!();`
271280
272- error: aborting due to 25 previous errors
281+ error: aborting due to 26 previous errors
273282
0 commit comments