2018-04-05 19:18:38 +00:00
|
|
|
error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
|
2018-08-01 14:30:44 +00:00
|
|
|
--> $DIR/single_match.rs:11:5
|
2018-04-05 19:18:38 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
11 | / match x {
|
|
|
|
12 | | Some(y) => { println!("{:?}", y); }
|
|
|
|
13 | | _ => ()
|
|
|
|
14 | | };
|
2018-04-05 19:18:38 +00:00
|
|
|
| |_____^ help: try this: `if let Some(y) = x { println!("{:?}", y); }`
|
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::single-match` implied by `-D warnings`
|
2018-04-05 19:18:38 +00:00
|
|
|
|
|
|
|
error: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`
|
2018-08-01 14:30:44 +00:00
|
|
|
--> $DIR/single_match.rs:17:5
|
2018-04-05 19:18:38 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
17 | / match z {
|
|
|
|
18 | | (2...3, 7...9) => dummy(),
|
|
|
|
19 | | _ => {}
|
|
|
|
20 | | };
|
2018-04-05 19:18:38 +00: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-08-01 14:30:44 +00:00
|
|
|
--> $DIR/single_match.rs:43:5
|
2018-04-05 19:18:38 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
43 | / match x {
|
|
|
|
44 | | Some(y) => dummy(),
|
|
|
|
45 | | None => ()
|
|
|
|
46 | | };
|
2018-04-05 19:18:38 +00: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-08-01 14:30:44 +00:00
|
|
|
--> $DIR/single_match.rs:48:5
|
2018-04-05 19:18:38 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
48 | / match y {
|
|
|
|
49 | | Ok(y) => dummy(),
|
|
|
|
50 | | Err(..) => ()
|
|
|
|
51 | | };
|
2018-04-05 19:18:38 +00: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-08-01 14:30:44 +00:00
|
|
|
--> $DIR/single_match.rs:55:5
|
2018-04-05 19:18:38 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
55 | / match c {
|
|
|
|
56 | | Cow::Borrowed(..) => dummy(),
|
|
|
|
57 | | Cow::Owned(..) => (),
|
|
|
|
58 | | };
|
2018-04-05 19:18:38 +00:00
|
|
|
| |_____^ help: try this: `if let Cow::Borrowed(..) = c { dummy() }`
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
|