11error: redundant pattern matching, consider using `is_none()`
2- --> $DIR/redundant_pattern_matching_option.rs:14 :12
2+ --> $DIR/redundant_pattern_matching_option.rs:8 :12
33 |
44LL | if let None = None::<()> {}
55 | -------^^^^------------- help: try this: `if None::<()>.is_none()`
66 |
77 = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
88
99error: redundant pattern matching, consider using `is_some()`
10- --> $DIR/redundant_pattern_matching_option.rs:16 :12
10+ --> $DIR/redundant_pattern_matching_option.rs:10 :12
1111 |
1212LL | if let Some(_) = Some(42) {}
1313 | -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
1414
1515error: redundant pattern matching, consider using `is_some()`
16- --> $DIR/redundant_pattern_matching_option.rs:18 :12
16+ --> $DIR/redundant_pattern_matching_option.rs:12 :12
1717 |
1818LL | if let Some(_) = Some(42) {
1919 | -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
2020
2121error: redundant pattern matching, consider using `is_some()`
22- --> $DIR/redundant_pattern_matching_option.rs:24 :15
22+ --> $DIR/redundant_pattern_matching_option.rs:18 :15
2323 |
2424LL | while let Some(_) = Some(42) {}
2525 | ----------^^^^^^^----------- help: try this: `while Some(42).is_some()`
2626
2727error: redundant pattern matching, consider using `is_none()`
28- --> $DIR/redundant_pattern_matching_option.rs:26 :15
28+ --> $DIR/redundant_pattern_matching_option.rs:20 :15
2929 |
3030LL | while let None = Some(42) {}
3131 | ----------^^^^----------- help: try this: `while Some(42).is_none()`
3232
3333error: redundant pattern matching, consider using `is_none()`
34- --> $DIR/redundant_pattern_matching_option.rs:28 :15
34+ --> $DIR/redundant_pattern_matching_option.rs:22 :15
3535 |
3636LL | while let None = None::<()> {}
3737 | ----------^^^^------------- help: try this: `while None::<()>.is_none()`
3838
3939error: redundant pattern matching, consider using `is_some()`
40- --> $DIR/redundant_pattern_matching_option.rs:31 :15
40+ --> $DIR/redundant_pattern_matching_option.rs:25 :15
4141 |
4242LL | while let Some(_) = v.pop() {
4343 | ----------^^^^^^^---------- help: try this: `while v.pop().is_some()`
4444
4545error: redundant pattern matching, consider using `is_some()`
46- --> $DIR/redundant_pattern_matching_option.rs:39 :5
46+ --> $DIR/redundant_pattern_matching_option.rs:33 :5
4747 |
4848LL | / match Some(42) {
4949LL | | Some(_) => true,
@@ -52,7 +52,7 @@ LL | | };
5252 | |_____^ help: try this: `Some(42).is_some()`
5353
5454error: redundant pattern matching, consider using `is_none()`
55- --> $DIR/redundant_pattern_matching_option.rs:44 :5
55+ --> $DIR/redundant_pattern_matching_option.rs:38 :5
5656 |
5757LL | / match None::<()> {
5858LL | | Some(_) => false,
@@ -61,7 +61,7 @@ LL | | };
6161 | |_____^ help: try this: `None::<()>.is_none()`
6262
6363error: redundant pattern matching, consider using `is_none()`
64- --> $DIR/redundant_pattern_matching_option.rs:49 :13
64+ --> $DIR/redundant_pattern_matching_option.rs:43 :13
6565 |
6666LL | let _ = match None::<()> {
6767 | _____________^
@@ -71,49 +71,49 @@ LL | | };
7171 | |_____^ help: try this: `None::<()>.is_none()`
7272
7373error: redundant pattern matching, consider using `is_some()`
74- --> $DIR/redundant_pattern_matching_option.rs:55 :20
74+ --> $DIR/redundant_pattern_matching_option.rs:49 :20
7575 |
7676LL | let x = if let Some(_) = opt { true } else { false };
7777 | -------^^^^^^^------ help: try this: `if opt.is_some()`
7878
7979error: redundant pattern matching, consider using `is_some()`
80- --> $DIR/redundant_pattern_matching_option.rs:60 :20
80+ --> $DIR/redundant_pattern_matching_option.rs:54 :20
8181 |
8282LL | let _ = if let Some(_) = gen_opt() {
8383 | -------^^^^^^^------------ help: try this: `if gen_opt().is_some()`
8484
8585error: redundant pattern matching, consider using `is_none()`
86- --> $DIR/redundant_pattern_matching_option.rs:62 :19
86+ --> $DIR/redundant_pattern_matching_option.rs:56 :19
8787 |
8888LL | } else if let None = gen_opt() {
8989 | -------^^^^------------ help: try this: `if gen_opt().is_none()`
9090
9191error: redundant pattern matching, consider using `is_some()`
92- --> $DIR/redundant_pattern_matching_option.rs:83 :12
92+ --> $DIR/redundant_pattern_matching_option.rs:77 :12
9393 |
9494LL | if let Some(_) = Some(42) {}
9595 | -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
9696
9797error: redundant pattern matching, consider using `is_none()`
98- --> $DIR/redundant_pattern_matching_option.rs:85 :12
98+ --> $DIR/redundant_pattern_matching_option.rs:79 :12
9999 |
100100LL | if let None = None::<()> {}
101101 | -------^^^^------------- help: try this: `if None::<()>.is_none()`
102102
103103error: redundant pattern matching, consider using `is_some()`
104- --> $DIR/redundant_pattern_matching_option.rs:87 :15
104+ --> $DIR/redundant_pattern_matching_option.rs:81 :15
105105 |
106106LL | while let Some(_) = Some(42) {}
107107 | ----------^^^^^^^----------- help: try this: `while Some(42).is_some()`
108108
109109error: redundant pattern matching, consider using `is_none()`
110- --> $DIR/redundant_pattern_matching_option.rs:89 :15
110+ --> $DIR/redundant_pattern_matching_option.rs:83 :15
111111 |
112112LL | while let None = None::<()> {}
113113 | ----------^^^^------------- help: try this: `while None::<()>.is_none()`
114114
115115error: redundant pattern matching, consider using `is_some()`
116- --> $DIR/redundant_pattern_matching_option.rs:91 :5
116+ --> $DIR/redundant_pattern_matching_option.rs:85 :5
117117 |
118118LL | / match Some(42) {
119119LL | | Some(_) => true,
@@ -122,7 +122,7 @@ LL | | };
122122 | |_____^ help: try this: `Some(42).is_some()`
123123
124124error: redundant pattern matching, consider using `is_none()`
125- --> $DIR/redundant_pattern_matching_option.rs:96 :5
125+ --> $DIR/redundant_pattern_matching_option.rs:90 :5
126126 |
127127LL | / match None::<()> {
128128LL | | Some(_) => false,
0 commit comments