@@ -19,19 +19,19 @@ LL | if let Err(_) = Err::<i32, i32>(42) {}
19
19
| -------^^^^^^---------------------- help: try this: `if Err::<i32, i32>(42).is_err()`
20
20
21
21
error: redundant pattern matching, consider using `is_ok()`
22
- --> $DIR/redundant_pattern_matching.rs:21 :15
22
+ --> $DIR/redundant_pattern_matching.rs:22 :15
23
23
|
24
24
LL | while let Ok(_) = Ok::<i32, i32>(10) {}
25
25
| ----------^^^^^--------------------- help: try this: `while Ok::<i32, i32>(10).is_ok()`
26
26
27
27
error: redundant pattern matching, consider using `is_err()`
28
- --> $DIR/redundant_pattern_matching.rs:23 :15
28
+ --> $DIR/redundant_pattern_matching.rs:24 :15
29
29
|
30
30
LL | while let Err(_) = Ok::<i32, i32>(10) {}
31
31
| ----------^^^^^^--------------------- help: try this: `while Ok::<i32, i32>(10).is_err()`
32
32
33
33
error: redundant pattern matching, consider using `is_ok()`
34
- --> $DIR/redundant_pattern_matching.rs:33 :5
34
+ --> $DIR/redundant_pattern_matching.rs:34 :5
35
35
|
36
36
LL | / match Ok::<i32, i32>(42) {
37
37
LL | | Ok(_) => true,
@@ -40,7 +40,7 @@ LL | | };
40
40
| |_____^ help: try this: `Ok::<i32, i32>(42).is_ok()`
41
41
42
42
error: redundant pattern matching, consider using `is_err()`
43
- --> $DIR/redundant_pattern_matching.rs:38 :5
43
+ --> $DIR/redundant_pattern_matching.rs:39 :5
44
44
|
45
45
LL | / match Ok::<i32, i32>(42) {
46
46
LL | | Ok(_) => false,
@@ -49,7 +49,7 @@ LL | | };
49
49
| |_____^ help: try this: `Ok::<i32, i32>(42).is_err()`
50
50
51
51
error: redundant pattern matching, consider using `is_err()`
52
- --> $DIR/redundant_pattern_matching.rs:43 :5
52
+ --> $DIR/redundant_pattern_matching.rs:44 :5
53
53
|
54
54
LL | / match Err::<i32, i32>(42) {
55
55
LL | | Ok(_) => false,
@@ -58,7 +58,7 @@ LL | | };
58
58
| |_____^ help: try this: `Err::<i32, i32>(42).is_err()`
59
59
60
60
error: redundant pattern matching, consider using `is_ok()`
61
- --> $DIR/redundant_pattern_matching.rs:48 :5
61
+ --> $DIR/redundant_pattern_matching.rs:49 :5
62
62
|
63
63
LL | / match Err::<i32, i32>(42) {
64
64
LL | | Ok(_) => true,
@@ -67,73 +67,73 @@ LL | | };
67
67
| |_____^ help: try this: `Err::<i32, i32>(42).is_ok()`
68
68
69
69
error: redundant pattern matching, consider using `is_ok()`
70
- --> $DIR/redundant_pattern_matching.rs:53 :20
70
+ --> $DIR/redundant_pattern_matching.rs:54 :20
71
71
|
72
72
LL | let _ = if let Ok(_) = Ok::<usize, ()>(4) { true } else { false };
73
73
| -------^^^^^--------------------- help: try this: `if Ok::<usize, ()>(4).is_ok()`
74
74
75
75
error: redundant pattern matching, consider using `is_ok()`
76
- --> $DIR/redundant_pattern_matching.rs:59 :20
76
+ --> $DIR/redundant_pattern_matching.rs:60 :20
77
77
|
78
78
LL | let _ = if let Ok(_) = gen_res() {
79
79
| -------^^^^^------------ help: try this: `if gen_res().is_ok()`
80
80
81
81
error: redundant pattern matching, consider using `is_err()`
82
- --> $DIR/redundant_pattern_matching.rs:61 :19
82
+ --> $DIR/redundant_pattern_matching.rs:62 :19
83
83
|
84
84
LL | } else if let Err(_) = gen_res() {
85
85
| -------^^^^^^------------ help: try this: `if gen_res().is_err()`
86
86
87
87
error: redundant pattern matching, consider using `is_some()`
88
- --> $DIR/redundant_pattern_matching.rs:84 :19
88
+ --> $DIR/redundant_pattern_matching.rs:85 :19
89
89
|
90
90
LL | while let Some(_) = r#try!(result_opt()) {}
91
91
| ----------^^^^^^^----------------------- help: try this: `while r#try!(result_opt()).is_some()`
92
92
93
93
error: redundant pattern matching, consider using `is_some()`
94
- --> $DIR/redundant_pattern_matching.rs:85 :16
94
+ --> $DIR/redundant_pattern_matching.rs:86 :16
95
95
|
96
96
LL | if let Some(_) = r#try!(result_opt()) {}
97
97
| -------^^^^^^^----------------------- help: try this: `if r#try!(result_opt()).is_some()`
98
98
99
99
error: redundant pattern matching, consider using `is_some()`
100
- --> $DIR/redundant_pattern_matching.rs:91 :12
100
+ --> $DIR/redundant_pattern_matching.rs:92 :12
101
101
|
102
102
LL | if let Some(_) = m!() {}
103
103
| -------^^^^^^^------- help: try this: `if m!().is_some()`
104
104
105
105
error: redundant pattern matching, consider using `is_some()`
106
- --> $DIR/redundant_pattern_matching.rs:92 :15
106
+ --> $DIR/redundant_pattern_matching.rs:93 :15
107
107
|
108
108
LL | while let Some(_) = m!() {}
109
109
| ----------^^^^^^^------- help: try this: `while m!().is_some()`
110
110
111
111
error: redundant pattern matching, consider using `is_ok()`
112
- --> $DIR/redundant_pattern_matching.rs:110 :12
112
+ --> $DIR/redundant_pattern_matching.rs:111 :12
113
113
|
114
114
LL | if let Ok(_) = Ok::<i32, i32>(42) {}
115
115
| -------^^^^^--------------------- help: try this: `if Ok::<i32, i32>(42).is_ok()`
116
116
117
117
error: redundant pattern matching, consider using `is_err()`
118
- --> $DIR/redundant_pattern_matching.rs:112 :12
118
+ --> $DIR/redundant_pattern_matching.rs:113 :12
119
119
|
120
120
LL | if let Err(_) = Err::<i32, i32>(42) {}
121
121
| -------^^^^^^---------------------- help: try this: `if Err::<i32, i32>(42).is_err()`
122
122
123
123
error: redundant pattern matching, consider using `is_ok()`
124
- --> $DIR/redundant_pattern_matching.rs:114 :15
124
+ --> $DIR/redundant_pattern_matching.rs:115 :15
125
125
|
126
126
LL | while let Ok(_) = Ok::<i32, i32>(10) {}
127
127
| ----------^^^^^--------------------- help: try this: `while Ok::<i32, i32>(10).is_ok()`
128
128
129
129
error: redundant pattern matching, consider using `is_err()`
130
- --> $DIR/redundant_pattern_matching.rs:116 :15
130
+ --> $DIR/redundant_pattern_matching.rs:117 :15
131
131
|
132
132
LL | while let Err(_) = Ok::<i32, i32>(10) {}
133
133
| ----------^^^^^^--------------------- help: try this: `while Ok::<i32, i32>(10).is_err()`
134
134
135
135
error: redundant pattern matching, consider using `is_ok()`
136
- --> $DIR/redundant_pattern_matching.rs:118 :5
136
+ --> $DIR/redundant_pattern_matching.rs:119 :5
137
137
|
138
138
LL | / match Ok::<i32, i32>(42) {
139
139
LL | | Ok(_) => true,
@@ -142,7 +142,7 @@ LL | | };
142
142
| |_____^ help: try this: `Ok::<i32, i32>(42).is_ok()`
143
143
144
144
error: redundant pattern matching, consider using `is_err()`
145
- --> $DIR/redundant_pattern_matching.rs:123 :5
145
+ --> $DIR/redundant_pattern_matching.rs:124 :5
146
146
|
147
147
LL | / match Err::<i32, i32>(42) {
148
148
LL | | Ok(_) => false,
0 commit comments