mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Update auto generated tests
This commit is contained in:
parent
48efc9d303
commit
f0a14346ee
1 changed files with 20 additions and 0 deletions
|
@ -407,6 +407,26 @@ fn main() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn doctest_convert_match_to_let_else() {
|
||||||
|
check_doc_test(
|
||||||
|
"convert_match_to_let_else",
|
||||||
|
r#####"
|
||||||
|
fn foo(opt: Option<()>) {
|
||||||
|
let val = $0match opt {
|
||||||
|
Some(it) => it,
|
||||||
|
None => return,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
"#####,
|
||||||
|
r#####"
|
||||||
|
fn foo(opt: Option<()>) {
|
||||||
|
let Some(val) = opt else { return };
|
||||||
|
}
|
||||||
|
"#####,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn doctest_convert_named_struct_to_tuple_struct() {
|
fn doctest_convert_named_struct_to_tuple_struct() {
|
||||||
check_doc_test(
|
check_doc_test(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue