Skip to content

Commit f0a1434

Browse files
committed
Update auto generated tests
1 parent 48efc9d commit f0a1434

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

crates/ide-assists/src/tests/generated.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,26 @@ fn main() {
407407
)
408408
}
409409

410+
#[test]
411+
fn doctest_convert_match_to_let_else() {
412+
check_doc_test(
413+
"convert_match_to_let_else",
414+
r#####"
415+
fn foo(opt: Option<()>) {
416+
let val = $0match opt {
417+
Some(it) => it,
418+
None => return,
419+
};
420+
}
421+
"#####,
422+
r#####"
423+
fn foo(opt: Option<()>) {
424+
let Some(val) = opt else { return };
425+
}
426+
"#####,
427+
)
428+
}
429+
410430
#[test]
411431
fn doctest_convert_named_struct_to_tuple_struct() {
412432
check_doc_test(

0 commit comments

Comments
 (0)