1 error: redundant pattern matching, consider using `is_ok()`
2 --> $DIR/redundant_pattern_matching.rs:6:12
4 LL | if let Ok(_) = Ok::<i32, i32>(42) {}
5 | -------^^^^^------------------------ help: try this: `Ok::<i32, i32>(42).is_ok()`
7 = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
9 error: redundant pattern matching, consider using `is_err()`
10 --> $DIR/redundant_pattern_matching.rs:8:12
12 LL | if let Err(_) = Err::<i32, i32>(42) {}
13 | -------^^^^^^------------------------- help: try this: `Err::<i32, i32>(42).is_err()`
15 error: redundant pattern matching, consider using `is_none()`
16 --> $DIR/redundant_pattern_matching.rs:10:12
18 LL | if let None = None::<()> {}
19 | -------^^^^---------------- help: try this: `None::<()>.is_none()`
21 error: redundant pattern matching, consider using `is_some()`
22 --> $DIR/redundant_pattern_matching.rs:12:12
24 LL | if let Some(_) = Some(42) {}
25 | -------^^^^^^^-------------- help: try this: `Some(42).is_some()`
27 error: redundant pattern matching, consider using `is_ok()`
28 --> $DIR/redundant_pattern_matching.rs:26:5
30 LL | / match Ok::<i32, i32>(42) {
32 LL | | Err(_) => false,
34 | |_____^ help: try this: `Ok::<i32, i32>(42).is_ok()`
36 error: redundant pattern matching, consider using `is_err()`
37 --> $DIR/redundant_pattern_matching.rs:31:5
39 LL | / match Ok::<i32, i32>(42) {
40 LL | | Ok(_) => false,
41 LL | | Err(_) => true,
43 | |_____^ help: try this: `Ok::<i32, i32>(42).is_err()`
45 error: redundant pattern matching, consider using `is_err()`
46 --> $DIR/redundant_pattern_matching.rs:36:5
48 LL | / match Err::<i32, i32>(42) {
49 LL | | Ok(_) => false,
50 LL | | Err(_) => true,
52 | |_____^ help: try this: `Err::<i32, i32>(42).is_err()`
54 error: redundant pattern matching, consider using `is_ok()`
55 --> $DIR/redundant_pattern_matching.rs:41:5
57 LL | / match Err::<i32, i32>(42) {
59 LL | | Err(_) => false,
61 | |_____^ help: try this: `Err::<i32, i32>(42).is_ok()`
63 error: redundant pattern matching, consider using `is_some()`
64 --> $DIR/redundant_pattern_matching.rs:46:5
66 LL | / match Some(42) {
67 LL | | Some(_) => true,
70 | |_____^ help: try this: `Some(42).is_some()`
72 error: redundant pattern matching, consider using `is_none()`
73 --> $DIR/redundant_pattern_matching.rs:51:5
75 LL | / match None::<()> {
76 LL | | Some(_) => false,
79 | |_____^ help: try this: `None::<()>.is_none()`
81 error: redundant pattern matching, consider using `is_none()`
82 --> $DIR/redundant_pattern_matching.rs:56:13
84 LL | let _ = match None::<()> {
86 LL | | Some(_) => false,
89 | |_____^ help: try this: `None::<()>.is_none()`
91 error: redundant pattern matching, consider using `is_ok()`
92 --> $DIR/redundant_pattern_matching.rs:61:20
94 LL | let _ = if let Ok(_) = Ok::<usize, ()>(4) { true } else { false };
95 | -------^^^^^--------------------------------------------- help: try this: `Ok::<usize, ()>(4).is_ok()`
97 error: redundant pattern matching, consider using `is_some()`
98 --> $DIR/redundant_pattern_matching.rs:67:20
100 LL | let x = if let Some(_) = opt { true } else { false };
101 | -------^^^^^^^------------------------------ help: try this: `opt.is_some()`
103 error: redundant pattern matching, consider using `is_some()`
104 --> $DIR/redundant_pattern_matching.rs:69:20
106 LL | let y = if let Some(_) = opt {};
107 | -------^^^^^^^--------- help: try this: `opt.is_some()`
109 error: redundant pattern matching, consider using `is_ok()`
110 --> $DIR/redundant_pattern_matching.rs:77:12
112 LL | if let Ok(_) = Ok::<i32, i32>(4) {
118 | |_____- help: try this: `Ok::<i32, i32>(4).is_ok()`
120 error: redundant pattern matching, consider using `is_ok()`
121 --> $DIR/redundant_pattern_matching.rs:85:12
123 LL | if let Ok(_) = Ok::<i32, i32>(4) {
129 | |_____- help: try this: `Ok::<i32, i32>(4).is_ok()`
131 error: aborting due to 16 previous errors