@@ -2,27 +2,33 @@ error: redundant pattern matching, consider using `is_ok()`
2
2
--> $DIR/if_let_redundant_pattern_matching.rs:19:12
3
3
|
4
4
19 | if let Ok(_) = Ok::<i32, i32>(42) {}
5
- | -------^^^^^--------------------- help: try this: `if Ok::<i32, i32>(42).is_ok()`
5
+ | -------^^^^^------------------------ help: try this: `if Ok::<i32, i32>(42).is_ok()`
6
6
|
7
7
= note: `-D clippy::if-let-redundant-pattern-matching` implied by `-D warnings`
8
8
9
9
error: redundant pattern matching, consider using `is_err()`
10
10
--> $DIR/if_let_redundant_pattern_matching.rs:21:12
11
11
|
12
- 21 | if let Err(_) = Err::<i32, i32>(42) {
13
- | -------^^^^^^---------------------- help: try this: `if Err::<i32, i32>(42).is_err()`
12
+ 21 | if let Err(_) = Err::<i32, i32>(42) {
13
+ | _____- ^^^^^^
14
+ 22 | | }
15
+ | |_____- help: try this: `if Err::<i32, i32>(42).is_err()`
14
16
15
17
error: redundant pattern matching, consider using `is_none()`
16
18
--> $DIR/if_let_redundant_pattern_matching.rs:24:12
17
19
|
18
- 24 | if let None = None::<()> {
19
- | -------^^^^------------- help: try this: `if None::<()>.is_none()`
20
+ 24 | if let None = None::<()> {
21
+ | _____- ^^^^
22
+ 25 | | }
23
+ | |_____- help: try this: `if None::<()>.is_none()`
20
24
21
25
error: redundant pattern matching, consider using `is_some()`
22
26
--> $DIR/if_let_redundant_pattern_matching.rs:27:12
23
27
|
24
- 27 | if let Some(_) = Some(42) {
25
- | -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
28
+ 27 | if let Some(_) = Some(42) {
29
+ | _____- ^^^^^^^
30
+ 28 | | }
31
+ | |_____- help: try this: `if Some(42).is_some()`
26
32
27
33
error: aborting due to 4 previous errors
28
34
0 commit comments