2018-04-05 14:18:38 -05:00
|
|
|
error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/single_match.rs:21:5
|
2018-04-05 14:18:38 -05:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
21 | / match x {
|
|
|
|
22 | | Some(y) => { println!("{:?}", y); }
|
|
|
|
23 | | _ => ()
|
|
|
|
24 | | };
|
2018-04-05 14:18:38 -05:00
|
|
|
| |_____^ help: try this: `if let Some(y) = x { println!("{:?}", y); }`
|
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
= note: `-D clippy::single-match` implied by `-D warnings`
|
2018-04-05 14:18:38 -05:00
|
|
|
|
|
|
|
error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/single_match.rs:27:5
|
2018-04-05 14:18:38 -05:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
27 | / match z {
|
|
|
|
28 | | (2...3, 7...9) => dummy(),
|
|
|
|
29 | | _ => {}
|
|
|
|
30 | | };
|
2018-04-05 14:18:38 -05:00
|
|
|
| |_____^ help: try this: `if let (2...3, 7...9) = z { dummy() }`
|
|
|
|
|
|
|
|
error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/single_match.rs:53:5
|
2018-04-05 14:18:38 -05:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
53 | / match x {
|
|
|
|
54 | | Some(y) => dummy(),
|
|
|
|
55 | | None => ()
|
|
|
|
56 | | };
|
2018-04-05 14:18:38 -05:00
|
|
|
| |_____^ help: try this: `if let Some(y) = x { dummy() }`
|
|
|
|
|
|
|
|
error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/single_match.rs:58:5
|
2018-04-05 14:18:38 -05:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
58 | / match y {
|
|
|
|
59 | | Ok(y) => dummy(),
|
|
|
|
60 | | Err(..) => ()
|
|
|
|
61 | | };
|
2018-04-05 14:18:38 -05:00
|
|
|
| |_____^ help: try this: `if let Ok(y) = y { dummy() }`
|
|
|
|
|
|
|
|
error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/single_match.rs:65:5
|
2018-04-05 14:18:38 -05:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
65 | / match c {
|
|
|
|
66 | | Cow::Borrowed(..) => dummy(),
|
|
|
|
67 | | Cow::Owned(..) => (),
|
|
|
|
68 | | };
|
2018-04-05 14:18:38 -05:00
|
|
|
| |_____^ help: try this: `if let Cow::Borrowed(..) = c { dummy() }`
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
|