2020-09-21 08:32:26 -05:00
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2021-10-04 01:33:40 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:14:12
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | if let None = None::<()> {}
|
|
|
|
| -------^^^^------------- help: try this: `if None::<()>.is_none()`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2021-10-04 01:33:40 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:16:12
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | if let Some(_) = Some(42) {}
|
|
|
|
| -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2021-10-04 01:33:40 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:18:12
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | if let Some(_) = Some(42) {
|
|
|
|
| -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2021-10-04 01:33:40 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:24:15
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | while let Some(_) = Some(42) {}
|
|
|
|
| ----------^^^^^^^----------- help: try this: `while Some(42).is_some()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2021-10-04 01:33:40 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:26:15
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | while let None = Some(42) {}
|
|
|
|
| ----------^^^^----------- help: try this: `while Some(42).is_none()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2021-10-04 01:33:40 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:28:15
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | while let None = None::<()> {}
|
|
|
|
| ----------^^^^------------- help: try this: `while None::<()>.is_none()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2021-10-04 01:33:40 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:31:15
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | while let Some(_) = v.pop() {
|
|
|
|
| ----------^^^^^^^---------- help: try this: `while v.pop().is_some()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2021-10-04 01:33:40 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:39:5
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | / match Some(42) {
|
|
|
|
LL | | Some(_) => true,
|
|
|
|
LL | | None => false,
|
|
|
|
LL | | };
|
|
|
|
| |_____^ help: try this: `Some(42).is_some()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2021-10-04 01:33:40 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:44:5
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | / match None::<()> {
|
|
|
|
LL | | Some(_) => false,
|
|
|
|
LL | | None => true,
|
|
|
|
LL | | };
|
|
|
|
| |_____^ help: try this: `None::<()>.is_none()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2021-10-04 01:33:40 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:49:13
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | let _ = match None::<()> {
|
|
|
|
| _____________^
|
|
|
|
LL | | Some(_) => false,
|
|
|
|
LL | | None => true,
|
|
|
|
LL | | };
|
|
|
|
| |_____^ help: try this: `None::<()>.is_none()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2021-10-04 01:33:40 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:55:20
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
2020-11-24 19:01:05 -06:00
|
|
|
LL | let _ = if let Some(_) = opt { true } else { false };
|
2020-09-21 08:32:26 -05:00
|
|
|
| -------^^^^^^^------ help: try this: `if opt.is_some()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2021-10-04 01:33:40 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:59:20
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | let _ = if let Some(_) = gen_opt() {
|
|
|
|
| -------^^^^^^^------------ help: try this: `if gen_opt().is_some()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2021-10-04 01:33:40 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:61:19
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | } else if let None = gen_opt() {
|
|
|
|
| -------^^^^------------ help: try this: `if gen_opt().is_none()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2023-04-23 14:34:42 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:67:12
|
|
|
|
|
|
|
|
|
LL | if let Some(..) = gen_opt() {}
|
|
|
|
| -------^^^^^^^^------------ help: try this: `if gen_opt().is_some()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:82:12
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | if let Some(_) = Some(42) {}
|
|
|
|
| -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-04-23 14:34:42 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:84:12
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | if let None = None::<()> {}
|
|
|
|
| -------^^^^------------- help: try this: `if None::<()>.is_none()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2023-04-23 14:34:42 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:86:15
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | while let Some(_) = Some(42) {}
|
|
|
|
| ----------^^^^^^^----------- help: try this: `while Some(42).is_some()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-04-23 14:34:42 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:88:15
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | while let None = None::<()> {}
|
|
|
|
| ----------^^^^------------- help: try this: `while None::<()>.is_none()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2023-04-23 14:34:42 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:90:5
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | / match Some(42) {
|
|
|
|
LL | | Some(_) => true,
|
|
|
|
LL | | None => false,
|
|
|
|
LL | | };
|
|
|
|
| |_____^ help: try this: `Some(42).is_some()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-04-23 14:34:42 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:95:5
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | / match None::<()> {
|
|
|
|
LL | | Some(_) => false,
|
|
|
|
LL | | None => true,
|
|
|
|
LL | | };
|
|
|
|
| |_____^ help: try this: `None::<()>.is_none()`
|
|
|
|
|
2021-11-08 17:31:18 -06:00
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-04-23 14:34:42 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:103:12
|
2021-11-08 17:31:18 -06:00
|
|
|
|
|
|
|
|
LL | if let None = *(&None::<()>) {}
|
|
|
|
| -------^^^^----------------- help: try this: `if (&None::<()>).is_none()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-04-23 14:34:42 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:104:12
|
2021-11-08 17:31:18 -06:00
|
|
|
|
|
|
|
|
LL | if let None = *&None::<()> {}
|
|
|
|
| -------^^^^--------------- help: try this: `if (&None::<()>).is_none()`
|
|
|
|
|
2023-04-23 14:34:42 -05:00
|
|
|
error: aborting due to 22 previous errors
|
2020-09-21 08:32:26 -05:00
|
|
|
|