@@ -143,16 +143,40 @@ LL | let x = if let Some(_) = opt { true } else { false };
143143 | -------^^^^^^^------ help: try this: `if opt.is_some()`
144144
145145error: redundant pattern matching, consider using `is_ok()`
146- --> $DIR/redundant_pattern_matching.rs:101 :12
146+ --> $DIR/redundant_pattern_matching.rs:103 :12
147147 |
148148LL | if let Ok(_) = Ok::<i32, i32>(4) {
149149 | -------^^^^^-------------------- help: try this: `if Ok::<i32, i32>(4).is_ok()`
150150
151151error: redundant pattern matching, consider using `is_ok()`
152- --> $DIR/redundant_pattern_matching.rs:109 :12
152+ --> $DIR/redundant_pattern_matching.rs:111 :12
153153 |
154154LL | if let Ok(_) = Ok::<i32, i32>(4) {
155155 | -------^^^^^-------------------- help: try this: `if Ok::<i32, i32>(4).is_ok()`
156156
157- error: aborting due to 22 previous errors
157+ error: redundant pattern matching, consider using `is_some()`
158+ --> $DIR/redundant_pattern_matching.rs:130:19
159+ |
160+ LL | while let Some(_) = r#try!(result_opt()) {}
161+ | ----------^^^^^^^----------------------- help: try this: `while r#try!(result_opt()).is_some()`
162+
163+ error: redundant pattern matching, consider using `is_some()`
164+ --> $DIR/redundant_pattern_matching.rs:131:16
165+ |
166+ LL | if let Some(_) = r#try!(result_opt()) {}
167+ | -------^^^^^^^----------------------- help: try this: `if r#try!(result_opt()).is_some()`
168+
169+ error: redundant pattern matching, consider using `is_some()`
170+ --> $DIR/redundant_pattern_matching.rs:137:12
171+ |
172+ LL | if let Some(_) = m!() {}
173+ | -------^^^^^^^------- help: try this: `if m!().is_some()`
174+
175+ error: redundant pattern matching, consider using `is_some()`
176+ --> $DIR/redundant_pattern_matching.rs:138:15
177+ |
178+ LL | while let Some(_) = m!() {}
179+ | ----------^^^^^^^------- help: try this: `while m!().is_some()`
180+
181+ error: aborting due to 26 previous errors
158182
0 commit comments