2017-02-07 14:05:30 -06:00
|
|
|
error: redundant pattern matching, consider using `is_ok()`
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/if_let_redundant_pattern_matching.rs:19:12
|
|
|
|
|
|
|
|
|
19 | if let Ok(_) = Ok::<i32, i32>(42) {}
|
|
|
|
| -------^^^^^--------------------- help: try this: `if Ok::<i32, i32>(42).is_ok()`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::if-let-redundant-pattern-matching` implied by `-D warnings`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_err()`
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/if_let_redundant_pattern_matching.rs:21:12
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
21 | if let Err(_) = Err::<i32, i32>(42) {
|
2017-07-21 03:40:23 -05:00
|
|
|
| -------^^^^^^---------------------- help: try this: `if Err::<i32, i32>(42).is_err()`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/if_let_redundant_pattern_matching.rs:24:12
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
24 | if let None = None::<()> {
|
2017-07-21 03:40:23 -05:00
|
|
|
| -------^^^^------------- help: try this: `if None::<()>.is_none()`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/if_let_redundant_pattern_matching.rs:27:12
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
27 | if let Some(_) = Some(42) {
|
2017-07-21 03:40:23 -05:00
|
|
|
| -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2018-01-16 10:06:27 -06:00
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|