1 error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
2 --> $DIR/single_match.rs:8:5
6 LL | | println!("{:?}", y);
12 = note: `-D clippy::single-match` implied by `-D warnings`
15 LL | if let Some(y) = x {
16 LL | println!("{:?}", y);
20 error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
21 --> $DIR/single_match.rs:16:5
24 LL | | // Note the missing block braces.
25 LL | | // We suggest `if let Some(y) = x { .. }` because the macro
26 LL | | // is expanded before we can do anything.
27 LL | | Some(y) => println!("{:?}", y),
30 | |_____^ help: try this: `if let Some(y) = x { println!("{:?}", y) }`
32 error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
33 --> $DIR/single_match.rs:25:5
36 LL | | (2...3, 7...9) => dummy(),
39 | |_____^ help: try this: `if let (2...3, 7...9) = z { dummy() }`
41 error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
42 --> $DIR/single_match.rs:54:5
45 LL | | Some(y) => dummy(),
48 | |_____^ help: try this: `if let Some(y) = x { dummy() }`
50 error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
51 --> $DIR/single_match.rs:59:5
54 LL | | Ok(y) => dummy(),
57 | |_____^ help: try this: `if let Ok(y) = y { dummy() }`
59 error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
60 --> $DIR/single_match.rs:66:5
63 LL | | Cow::Borrowed(..) => dummy(),
64 LL | | Cow::Owned(..) => (),
66 | |_____^ help: try this: `if let Cow::Borrowed(..) = c { dummy() }`
68 error: aborting due to 6 previous errors