@@ -149,52 +149,94 @@ LL | let x = if let Some(_) = opt { true } else { false };
149149 | -------^^^^^^^------ help: try this: `if opt.is_some()`
150150
151151error: redundant pattern matching, consider using `is_some()`
152- --> $DIR/redundant_pattern_matching.rs:102 :20
152+ --> $DIR/redundant_pattern_matching.rs:103 :20
153153 |
154154LL | let _ = if let Some(_) = gen_opt() {
155155 | -------^^^^^^^------------ help: try this: `if gen_opt().is_some()`
156156
157157error: redundant pattern matching, consider using `is_none()`
158- --> $DIR/redundant_pattern_matching.rs:104 :19
158+ --> $DIR/redundant_pattern_matching.rs:105 :19
159159 |
160160LL | } else if let None = gen_opt() {
161161 | -------^^^^------------ help: try this: `if gen_opt().is_none()`
162162
163163error: redundant pattern matching, consider using `is_ok()`
164- --> $DIR/redundant_pattern_matching.rs:106 :19
164+ --> $DIR/redundant_pattern_matching.rs:107 :19
165165 |
166166LL | } else if let Ok(_) = gen_res() {
167167 | -------^^^^^------------ help: try this: `if gen_res().is_ok()`
168168
169169error: redundant pattern matching, consider using `is_err()`
170- --> $DIR/redundant_pattern_matching.rs:108 :19
170+ --> $DIR/redundant_pattern_matching.rs:109 :19
171171 |
172172LL | } else if let Err(_) = gen_res() {
173173 | -------^^^^^^------------ help: try this: `if gen_res().is_err()`
174174
175175error: redundant pattern matching, consider using `is_some()`
176- --> $DIR/redundant_pattern_matching.rs:141 :19
176+ --> $DIR/redundant_pattern_matching.rs:142 :19
177177 |
178178LL | while let Some(_) = r#try!(result_opt()) {}
179179 | ----------^^^^^^^----------------------- help: try this: `while r#try!(result_opt()).is_some()`
180180
181181error: redundant pattern matching, consider using `is_some()`
182- --> $DIR/redundant_pattern_matching.rs:142 :16
182+ --> $DIR/redundant_pattern_matching.rs:143 :16
183183 |
184184LL | if let Some(_) = r#try!(result_opt()) {}
185185 | -------^^^^^^^----------------------- help: try this: `if r#try!(result_opt()).is_some()`
186186
187187error: redundant pattern matching, consider using `is_some()`
188- --> $DIR/redundant_pattern_matching.rs:148 :12
188+ --> $DIR/redundant_pattern_matching.rs:149 :12
189189 |
190190LL | if let Some(_) = m!() {}
191191 | -------^^^^^^^------- help: try this: `if m!().is_some()`
192192
193193error: redundant pattern matching, consider using `is_some()`
194- --> $DIR/redundant_pattern_matching.rs:149 :15
194+ --> $DIR/redundant_pattern_matching.rs:150 :15
195195 |
196196LL | while let Some(_) = m!() {}
197197 | ----------^^^^^^^------- help: try this: `while m!().is_some()`
198198
199- error: aborting due to 29 previous errors
199+ error: redundant pattern matching, consider using `is_ok()`
200+ --> $DIR/redundant_pattern_matching.rs:179:12
201+ |
202+ LL | if let Ok(_) = Ok::<i32, i32>(42) {}
203+ | -------^^^^^--------------------- help: try this: `if Ok::<i32, i32>(42).is_ok()`
204+
205+ error: redundant pattern matching, consider using `is_err()`
206+ --> $DIR/redundant_pattern_matching.rs:181:12
207+ |
208+ LL | if let Err(_) = Err::<i32, i32>(42) {}
209+ | -------^^^^^^---------------------- help: try this: `if Err::<i32, i32>(42).is_err()`
210+
211+ error: redundant pattern matching, consider using `is_ok()`
212+ --> $DIR/redundant_pattern_matching.rs:183:15
213+ |
214+ LL | while let Ok(_) = Ok::<i32, i32>(10) {}
215+ | ----------^^^^^--------------------- help: try this: `while Ok::<i32, i32>(10).is_ok()`
216+
217+ error: redundant pattern matching, consider using `is_err()`
218+ --> $DIR/redundant_pattern_matching.rs:185:15
219+ |
220+ LL | while let Err(_) = Ok::<i32, i32>(10) {}
221+ | ----------^^^^^^--------------------- help: try this: `while Ok::<i32, i32>(10).is_err()`
222+
223+ error: redundant pattern matching, consider using `is_ok()`
224+ --> $DIR/redundant_pattern_matching.rs:187:5
225+ |
226+ LL | / match Ok::<i32, i32>(42) {
227+ LL | | Ok(_) => true,
228+ LL | | Err(_) => false,
229+ LL | | };
230+ | |_____^ help: try this: `Ok::<i32, i32>(42).is_ok()`
231+
232+ error: redundant pattern matching, consider using `is_err()`
233+ --> $DIR/redundant_pattern_matching.rs:192:5
234+ |
235+ LL | / match Err::<i32, i32>(42) {
236+ LL | | Ok(_) => false,
237+ LL | | Err(_) => true,
238+ LL | | };
239+ | |_____^ help: try this: `Err::<i32, i32>(42).is_err()`
240+
241+ error: aborting due to 35 previous errors
200242
0 commit comments