mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
Update auto generated tests
This commit is contained in:
parent
48efc9d303
commit
f0a14346ee
@ -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]
|
||||
fn doctest_convert_named_struct_to_tuple_struct() {
|
||||
check_doc_test(
|
||||
|
Loading…
Reference in New Issue
Block a user