@@ -77,49 +77,49 @@ LL | let _ = if let Some(_) = opt { true } else { false };
77
77
| -------^^^^^^^------ help: try this: `if opt.is_some()`
78
78
79
79
error: redundant pattern matching, consider using `is_some()`
80
- --> $DIR/redundant_pattern_matching_option.rs:59 :20
80
+ --> $DIR/redundant_pattern_matching_option.rs:60 :20
81
81
|
82
82
LL | let _ = if let Some(_) = gen_opt() {
83
83
| -------^^^^^^^------------ help: try this: `if gen_opt().is_some()`
84
84
85
85
error: redundant pattern matching, consider using `is_none()`
86
- --> $DIR/redundant_pattern_matching_option.rs:61 :19
86
+ --> $DIR/redundant_pattern_matching_option.rs:62 :19
87
87
|
88
88
LL | } else if let None = gen_opt() {
89
89
| -------^^^^------------ help: try this: `if gen_opt().is_none()`
90
90
91
91
error: redundant pattern matching, consider using `is_some()`
92
- --> $DIR/redundant_pattern_matching_option.rs:67 :12
92
+ --> $DIR/redundant_pattern_matching_option.rs:68 :12
93
93
|
94
94
LL | if let Some(..) = gen_opt() {}
95
95
| -------^^^^^^^^------------ help: try this: `if gen_opt().is_some()`
96
96
97
97
error: redundant pattern matching, consider using `is_some()`
98
- --> $DIR/redundant_pattern_matching_option.rs:82 :12
98
+ --> $DIR/redundant_pattern_matching_option.rs:83 :12
99
99
|
100
100
LL | if let Some(_) = Some(42) {}
101
101
| -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
102
102
103
103
error: redundant pattern matching, consider using `is_none()`
104
- --> $DIR/redundant_pattern_matching_option.rs:84 :12
104
+ --> $DIR/redundant_pattern_matching_option.rs:85 :12
105
105
|
106
106
LL | if let None = None::<()> {}
107
107
| -------^^^^------------- help: try this: `if None::<()>.is_none()`
108
108
109
109
error: redundant pattern matching, consider using `is_some()`
110
- --> $DIR/redundant_pattern_matching_option.rs:86 :15
110
+ --> $DIR/redundant_pattern_matching_option.rs:87 :15
111
111
|
112
112
LL | while let Some(_) = Some(42) {}
113
113
| ----------^^^^^^^----------- help: try this: `while Some(42).is_some()`
114
114
115
115
error: redundant pattern matching, consider using `is_none()`
116
- --> $DIR/redundant_pattern_matching_option.rs:88 :15
116
+ --> $DIR/redundant_pattern_matching_option.rs:89 :15
117
117
|
118
118
LL | while let None = None::<()> {}
119
119
| ----------^^^^------------- help: try this: `while None::<()>.is_none()`
120
120
121
121
error: redundant pattern matching, consider using `is_some()`
122
- --> $DIR/redundant_pattern_matching_option.rs:90 :5
122
+ --> $DIR/redundant_pattern_matching_option.rs:91 :5
123
123
|
124
124
LL | / match Some(42) {
125
125
LL | | Some(_) => true,
@@ -128,7 +128,7 @@ LL | | };
128
128
| |_____^ help: try this: `Some(42).is_some()`
129
129
130
130
error: redundant pattern matching, consider using `is_none()`
131
- --> $DIR/redundant_pattern_matching_option.rs:95 :5
131
+ --> $DIR/redundant_pattern_matching_option.rs:96 :5
132
132
|
133
133
LL | / match None::<()> {
134
134
LL | | Some(_) => false,
@@ -137,16 +137,88 @@ LL | | };
137
137
| |_____^ help: try this: `None::<()>.is_none()`
138
138
139
139
error: redundant pattern matching, consider using `is_none()`
140
- --> $DIR/redundant_pattern_matching_option.rs:103 :12
140
+ --> $DIR/redundant_pattern_matching_option.rs:104 :12
141
141
|
142
142
LL | if let None = *(&None::<()>) {}
143
143
| -------^^^^----------------- help: try this: `if (&None::<()>).is_none()`
144
144
145
145
error: redundant pattern matching, consider using `is_none()`
146
- --> $DIR/redundant_pattern_matching_option.rs:104 :12
146
+ --> $DIR/redundant_pattern_matching_option.rs:105 :12
147
147
|
148
148
LL | if let None = *&None::<()> {}
149
149
| -------^^^^--------------- help: try this: `if (&None::<()>).is_none()`
150
150
151
- error: aborting due to 22 previous errors
151
+ error: redundant pattern matching, consider using `is_some()`
152
+ --> $DIR/redundant_pattern_matching_option.rs:109:5
153
+ |
154
+ LL | / match Some(42) {
155
+ LL | | Some(_) => true,
156
+ LL | | _ => false,
157
+ LL | | };
158
+ | |_____^ help: try this: `Some(42).is_some()`
159
+
160
+ error: redundant pattern matching, consider using `is_none()`
161
+ --> $DIR/redundant_pattern_matching_option.rs:114:5
162
+ |
163
+ LL | / match Some(42) {
164
+ LL | | Some(_) => false,
165
+ LL | | _ => true,
166
+ LL | | };
167
+ | |_____^ help: try this: `Some(42).is_none()`
168
+
169
+ error: redundant pattern matching, consider using `is_none()`
170
+ --> $DIR/redundant_pattern_matching_option.rs:119:5
171
+ |
172
+ LL | / match Some(42) {
173
+ LL | | None => true,
174
+ LL | | _ => false,
175
+ LL | | };
176
+ | |_____^ help: try this: `Some(42).is_none()`
177
+
178
+ error: redundant pattern matching, consider using `is_some()`
179
+ --> $DIR/redundant_pattern_matching_option.rs:124:5
180
+ |
181
+ LL | / match Some(42) {
182
+ LL | | None => false,
183
+ LL | | _ => true,
184
+ LL | | };
185
+ | |_____^ help: try this: `Some(42).is_some()`
186
+
187
+ error: redundant pattern matching, consider using `is_none()`
188
+ --> $DIR/redundant_pattern_matching_option.rs:129:5
189
+ |
190
+ LL | / match None::<()> {
191
+ LL | | Some(_) => false,
192
+ LL | | _ => true,
193
+ LL | | };
194
+ | |_____^ help: try this: `None::<()>.is_none()`
195
+
196
+ error: redundant pattern matching, consider using `is_none()`
197
+ --> $DIR/redundant_pattern_matching_option.rs:134:5
198
+ |
199
+ LL | / match None::<()> {
200
+ LL | | Some(_) => false,
201
+ LL | | _ => true,
202
+ LL | | };
203
+ | |_____^ help: try this: `None::<()>.is_none()`
204
+
205
+ error: redundant pattern matching, consider using `is_none()`
206
+ --> $DIR/redundant_pattern_matching_option.rs:139:5
207
+ |
208
+ LL | / match None::<()> {
209
+ LL | | None => true,
210
+ LL | | _ => false,
211
+ LL | | };
212
+ | |_____^ help: try this: `None::<()>.is_none()`
213
+
214
+ error: redundant pattern matching, consider using `is_some()`
215
+ --> $DIR/redundant_pattern_matching_option.rs:144:5
216
+ |
217
+ LL | / match None::<()> {
218
+ LL | | None => false,
219
+ LL | | _ => true,
220
+ LL | | };
221
+ | |_____^ help: try this: `None::<()>.is_some()`
222
+
223
+ error: aborting due to 30 previous errors
152
224
0 commit comments