11error: redundant pattern matching, consider using `is_none()`
2- --> $DIR/redundant_pattern_matching_option.rs:8 :12
2+ --> $DIR/redundant_pattern_matching_option.rs:13 :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:10 :12
10+ --> $DIR/redundant_pattern_matching_option.rs:15 :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:12 :12
16+ --> $DIR/redundant_pattern_matching_option.rs:17 :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:18 :15
22+ --> $DIR/redundant_pattern_matching_option.rs:23 :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:20 :15
28+ --> $DIR/redundant_pattern_matching_option.rs:25 :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:22 :15
34+ --> $DIR/redundant_pattern_matching_option.rs:27 :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:25 :15
40+ --> $DIR/redundant_pattern_matching_option.rs:30 :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:33 :5
46+ --> $DIR/redundant_pattern_matching_option.rs:38 :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:38 :5
55+ --> $DIR/redundant_pattern_matching_option.rs:43 :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:43 :13
64+ --> $DIR/redundant_pattern_matching_option.rs:48 :13
6565 |
6666LL | let _ = match None::<()> {
6767 | _____________^
@@ -71,25 +71,25 @@ LL | | };
7171 | |_____^ help: try this: `None::<()>.is_none()`
7272
7373error: redundant pattern matching, consider using `is_some()`
74- --> $DIR/redundant_pattern_matching_option.rs:49 :20
74+ --> $DIR/redundant_pattern_matching_option.rs:54 :20
7575 |
7676LL | let _ = 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:53 :20
80+ --> $DIR/redundant_pattern_matching_option.rs:58 :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:55 :19
86+ --> $DIR/redundant_pattern_matching_option.rs:60 :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:64 :12
92+ --> $DIR/redundant_pattern_matching_option.rs:69 :12
9393 |
9494LL | if let Some(_) = Some(m.lock()) {}
9595 | -------^^^^^^^----------------- help: try this: `if Some(m.lock()).is_some()`
@@ -98,7 +98,7 @@ LL | if let Some(_) = Some(m.lock()) {}
9898 = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
9999
100100error: redundant pattern matching, consider using `is_some()`
101- --> $DIR/redundant_pattern_matching_option.rs:65 :12
101+ --> $DIR/redundant_pattern_matching_option.rs:70 :12
102102 |
103103LL | if let Some(_) = Some(m.lock().unwrap().0) {}
104104 | -------^^^^^^^---------------------------- help: try this: `if Some(m.lock().unwrap().0).is_some()`
@@ -107,7 +107,7 @@ LL | if let Some(_) = Some(m.lock().unwrap().0) {}
107107 = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
108108
109109error: redundant pattern matching, consider using `is_none()`
110- --> $DIR/redundant_pattern_matching_option.rs:68 :16
110+ --> $DIR/redundant_pattern_matching_option.rs:73 :16
111111 |
112112LL | if let None = None::<std::sync::MutexGuard<()>> {}
113113 | -------^^^^------------------------------------ help: try this: `if None::<std::sync::MutexGuard<()>>.is_none()`
@@ -116,7 +116,7 @@ LL | if let None = None::<std::sync::MutexGuard<()>> {}
116116 = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
117117
118118error: redundant pattern matching, consider using `is_none()`
119- --> $DIR/redundant_pattern_matching_option.rs:70 :12
119+ --> $DIR/redundant_pattern_matching_option.rs:75 :12
120120 |
121121LL | if let None = None::<std::sync::MutexGuard<()>> {
122122 | -------^^^^------------------------------------ help: try this: `if None::<std::sync::MutexGuard<()>>.is_none()`
@@ -125,49 +125,49 @@ LL | if let None = None::<std::sync::MutexGuard<()>> {
125125 = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
126126
127127error: redundant pattern matching, consider using `is_none()`
128- --> $DIR/redundant_pattern_matching_option.rs:74 :12
128+ --> $DIR/redundant_pattern_matching_option.rs:79 :12
129129 |
130130LL | if let None = None::<std::sync::MutexGuard<()>> {}
131131 | -------^^^^------------------------------------ help: try this: `if None::<std::sync::MutexGuard<()>>.is_none()`
132132
133133error: redundant pattern matching, consider using `is_some()`
134- --> $DIR/redundant_pattern_matching_option.rs:76 :12
134+ --> $DIR/redundant_pattern_matching_option.rs:81 :12
135135 |
136136LL | if let Some(_) = Some(String::new()) {}
137137 | -------^^^^^^^---------------------- help: try this: `if Some(String::new()).is_some()`
138138
139139error: redundant pattern matching, consider using `is_some()`
140- --> $DIR/redundant_pattern_matching_option.rs:77 :12
140+ --> $DIR/redundant_pattern_matching_option.rs:82 :12
141141 |
142142LL | if let Some(_) = Some((String::new(), ())) {}
143143 | -------^^^^^^^---------------------------- help: try this: `if Some((String::new(), ())).is_some()`
144144
145145error: redundant pattern matching, consider using `is_some()`
146- --> $DIR/redundant_pattern_matching_option.rs:92 :12
146+ --> $DIR/redundant_pattern_matching_option.rs:97 :12
147147 |
148148LL | if let Some(_) = Some(42) {}
149149 | -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
150150
151151error: redundant pattern matching, consider using `is_none()`
152- --> $DIR/redundant_pattern_matching_option.rs:94 :12
152+ --> $DIR/redundant_pattern_matching_option.rs:99 :12
153153 |
154154LL | if let None = None::<()> {}
155155 | -------^^^^------------- help: try this: `if None::<()>.is_none()`
156156
157157error: redundant pattern matching, consider using `is_some()`
158- --> $DIR/redundant_pattern_matching_option.rs:96 :15
158+ --> $DIR/redundant_pattern_matching_option.rs:101 :15
159159 |
160160LL | while let Some(_) = Some(42) {}
161161 | ----------^^^^^^^----------- help: try this: `while Some(42).is_some()`
162162
163163error: redundant pattern matching, consider using `is_none()`
164- --> $DIR/redundant_pattern_matching_option.rs:98 :15
164+ --> $DIR/redundant_pattern_matching_option.rs:103 :15
165165 |
166166LL | while let None = None::<()> {}
167167 | ----------^^^^------------- help: try this: `while None::<()>.is_none()`
168168
169169error: redundant pattern matching, consider using `is_some()`
170- --> $DIR/redundant_pattern_matching_option.rs:100 :5
170+ --> $DIR/redundant_pattern_matching_option.rs:105 :5
171171 |
172172LL | / match Some(42) {
173173LL | | Some(_) => true,
@@ -176,7 +176,7 @@ LL | | };
176176 | |_____^ help: try this: `Some(42).is_some()`
177177
178178error: redundant pattern matching, consider using `is_none()`
179- --> $DIR/redundant_pattern_matching_option.rs:105 :5
179+ --> $DIR/redundant_pattern_matching_option.rs:110 :5
180180 |
181181LL | / match None::<()> {
182182LL | | Some(_) => false,
0 commit comments