We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f0d42d commit 223cbd2Copy full SHA for 223cbd2
tests/ui/option_if_let_else.fixed
@@ -177,4 +177,14 @@ fn main() {
177
// issue #8492
178
let _ = s.map_or(1, |string| string.len());
179
let _ = Some(10).map_or(5, |a| a + 1);
180
+
181
+ let res: Result<i32, i32> = Ok(5);
182
+ let _ = match res {
183
+ Ok(a) => a + 1,
184
+ _ => 1,
185
+ };
186
187
+ Err(_) => 1,
188
189
190
}
tests/ui/option_if_let_else.rs
@@ -212,4 +212,14 @@ fn main() {
212
Some(a) => a + 1,
213
None => 5,
214
};
215
216
217
218
219
220
221
222
223
224
225
0 commit comments