2020-09-21 08:32:26 -05:00
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:15:12
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | if let None = None::<()> {}
|
2023-07-01 06:08:01 -05:00
|
|
|
| -------^^^^------------- help: try: `if None::<()>.is_none()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
= note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:17:12
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | if let Some(_) = Some(42) {}
|
2023-07-01 06:08:01 -05:00
|
|
|
| -------^^^^^^^----------- help: try: `if Some(42).is_some()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:19:12
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | if let Some(_) = Some(42) {
|
2023-07-01 06:08:01 -05:00
|
|
|
| -------^^^^^^^----------- help: try: `if Some(42).is_some()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:25:15
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | while let Some(_) = Some(42) {}
|
2023-07-01 06:08:01 -05:00
|
|
|
| ----------^^^^^^^----------- help: try: `while Some(42).is_some()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:27:15
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | while let None = Some(42) {}
|
2023-07-01 06:08:01 -05:00
|
|
|
| ----------^^^^----------- help: try: `while Some(42).is_none()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:29:15
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | while let None = None::<()> {}
|
2023-07-01 06:08:01 -05:00
|
|
|
| ----------^^^^------------- help: try: `while None::<()>.is_none()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:32:15
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | while let Some(_) = v.pop() {
|
2023-07-01 06:08:01 -05:00
|
|
|
| ----------^^^^^^^---------- help: try: `while v.pop().is_some()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:40:5
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | / match Some(42) {
|
|
|
|
LL | | Some(_) => true,
|
|
|
|
LL | | None => false,
|
|
|
|
LL | | };
|
2023-07-01 06:08:01 -05:00
|
|
|
| |_____^ help: try: `Some(42).is_some()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:45:5
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | / match None::<()> {
|
|
|
|
LL | | Some(_) => false,
|
|
|
|
LL | | None => true,
|
|
|
|
LL | | };
|
2023-07-01 06:08:01 -05:00
|
|
|
| |_____^ help: try: `None::<()>.is_none()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:50:13
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | let _ = match None::<()> {
|
|
|
|
| _____________^
|
|
|
|
LL | | Some(_) => false,
|
|
|
|
LL | | None => true,
|
|
|
|
LL | | };
|
2023-07-01 06:08:01 -05:00
|
|
|
| |_____^ help: try: `None::<()>.is_none()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:56: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 };
|
2023-07-01 06:08:01 -05:00
|
|
|
| -------^^^^^^^------ help: try: `if opt.is_some()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:62:20
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | let _ = if let Some(_) = gen_opt() {
|
2023-07-01 06:08:01 -05:00
|
|
|
| -------^^^^^^^------------ help: try: `if gen_opt().is_some()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:64:19
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | } else if let None = gen_opt() {
|
2023-07-01 06:08:01 -05:00
|
|
|
| -------^^^^------------ help: try: `if gen_opt().is_none()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:70:12
|
2023-04-23 14:34:42 -05:00
|
|
|
|
|
|
|
|
LL | if let Some(..) = gen_opt() {}
|
2023-07-01 06:08:01 -05:00
|
|
|
| -------^^^^^^^^------------ help: try: `if gen_opt().is_some()`
|
2023-04-23 14:34:42 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:85:12
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | if let Some(_) = Some(42) {}
|
2023-07-01 06:08:01 -05:00
|
|
|
| -------^^^^^^^----------- help: try: `if Some(42).is_some()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:87:12
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | if let None = None::<()> {}
|
2023-07-01 06:08:01 -05:00
|
|
|
| -------^^^^------------- help: try: `if None::<()>.is_none()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:89:15
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | while let Some(_) = Some(42) {}
|
2023-07-01 06:08:01 -05:00
|
|
|
| ----------^^^^^^^----------- help: try: `while Some(42).is_some()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:91:15
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | while let None = None::<()> {}
|
2023-07-01 06:08:01 -05:00
|
|
|
| ----------^^^^------------- help: try: `while None::<()>.is_none()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:93:5
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | / match Some(42) {
|
|
|
|
LL | | Some(_) => true,
|
|
|
|
LL | | None => false,
|
|
|
|
LL | | };
|
2023-07-01 06:08:01 -05:00
|
|
|
| |_____^ help: try: `Some(42).is_some()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:98:5
|
2020-09-21 08:32:26 -05:00
|
|
|
|
|
|
|
|
LL | / match None::<()> {
|
|
|
|
LL | | Some(_) => false,
|
|
|
|
LL | | None => true,
|
|
|
|
LL | | };
|
2023-07-01 06:08:01 -05:00
|
|
|
| |_____^ help: try: `None::<()>.is_none()`
|
2020-09-21 08:32:26 -05:00
|
|
|
|
2021-11-08 17:31:18 -06:00
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:106:12
|
2021-11-08 17:31:18 -06:00
|
|
|
|
|
|
|
|
LL | if let None = *(&None::<()>) {}
|
2023-07-01 06:08:01 -05:00
|
|
|
| -------^^^^----------------- help: try: `if (&None::<()>).is_none()`
|
2021-11-08 17:31:18 -06:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:107:12
|
2021-11-08 17:31:18 -06:00
|
|
|
|
|
|
|
|
LL | if let None = *&None::<()> {}
|
2023-07-01 06:08:01 -05:00
|
|
|
| -------^^^^--------------- help: try: `if (&None::<()>).is_none()`
|
2021-11-08 17:31:18 -06:00
|
|
|
|
2023-05-05 14:33:16 -05:00
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:113:5
|
2023-05-05 14:33:16 -05:00
|
|
|
|
|
2023-05-11 00:20:02 -05:00
|
|
|
LL | / match x {
|
2023-05-05 14:33:16 -05:00
|
|
|
LL | | Some(_) => true,
|
|
|
|
LL | | _ => false,
|
|
|
|
LL | | };
|
2023-07-01 06:08:01 -05:00
|
|
|
| |_____^ help: try: `x.is_some()`
|
2023-05-05 14:33:16 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:118:5
|
2023-05-05 14:33:16 -05:00
|
|
|
|
|
2023-05-11 00:20:02 -05:00
|
|
|
LL | / match x {
|
2023-05-05 14:33:16 -05:00
|
|
|
LL | | None => true,
|
|
|
|
LL | | _ => false,
|
|
|
|
LL | | };
|
2023-07-01 06:08:01 -05:00
|
|
|
| |_____^ help: try: `x.is_none()`
|
2023-05-05 14:33:16 -05:00
|
|
|
|
2023-05-15 12:43:22 -05:00
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:123:5
|
2023-05-05 14:33:16 -05:00
|
|
|
|
|
2023-05-15 12:43:22 -05:00
|
|
|
LL | / match x {
|
|
|
|
LL | | Some(_) => false,
|
|
|
|
LL | | _ => true,
|
2023-05-05 14:33:16 -05:00
|
|
|
LL | | };
|
2023-07-01 06:08:01 -05:00
|
|
|
| |_____^ help: try: `x.is_none()`
|
2023-05-05 14:33:16 -05:00
|
|
|
|
2023-05-15 12:43:22 -05:00
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:128:5
|
2023-05-05 14:33:16 -05:00
|
|
|
|
|
2023-05-15 12:43:22 -05:00
|
|
|
LL | / match x {
|
|
|
|
LL | | None => false,
|
|
|
|
LL | | _ => true,
|
2023-05-05 14:33:16 -05:00
|
|
|
LL | | };
|
2023-07-01 06:08:01 -05:00
|
|
|
| |_____^ help: try: `x.is_some()`
|
2023-05-05 14:33:16 -05:00
|
|
|
|
2023-05-25 23:16:39 -05:00
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:143:13
|
2023-05-25 23:16:39 -05:00
|
|
|
|
|
|
|
|
LL | let _ = matches!(x, Some(_));
|
2023-07-01 06:08:01 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: try: `x.is_some()`
|
2023-05-25 23:16:39 -05:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2023-06-10 06:43:30 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_option.rs:145:13
|
2023-05-25 23:16:39 -05:00
|
|
|
|
|
|
|
|
LL | let _ = matches!(x, None);
|
2023-07-01 06:08:01 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `x.is_none()`
|
2023-05-25 23:16:39 -05:00
|
|
|
|
|
|
|
error: aborting due to 28 previous errors
|
2020-09-21 08:32:26 -05:00
|
|
|
|