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