mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-12-23 08:48:08 +00:00
update
This commit is contained in:
parent
2f4ca9d599
commit
2dcbfefb03
1 changed files with 50 additions and 0 deletions
|
|
@ -754,6 +754,31 @@ fn foo() {
|
|||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn doctest_convert_record_struct_to_unit_struct() {
|
||||
check_doc_test(
|
||||
"convert_record_struct_to_unit_struct",
|
||||
r#####"
|
||||
struct Foo$0 {}
|
||||
|
||||
impl Foo {
|
||||
fn new() -> Self {
|
||||
Foo {}
|
||||
}
|
||||
}
|
||||
"#####,
|
||||
r#####"
|
||||
struct Foo;
|
||||
|
||||
impl Foo {
|
||||
fn new() -> Self {
|
||||
Foo
|
||||
}
|
||||
}
|
||||
"#####,
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn doctest_convert_to_guarded_return() {
|
||||
check_doc_test(
|
||||
|
|
@ -866,6 +891,31 @@ fn main() {
|
|||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn doctest_convert_unit_struct_to_record_struct() {
|
||||
check_doc_test(
|
||||
"convert_unit_struct_to_record_struct",
|
||||
r#####"
|
||||
struct Foo$0;
|
||||
|
||||
impl Foo {
|
||||
fn new() -> Self {
|
||||
Foo
|
||||
}
|
||||
}
|
||||
"#####,
|
||||
r#####"
|
||||
struct Foo {}
|
||||
|
||||
impl Foo {
|
||||
fn new() -> Self {
|
||||
Foo {}
|
||||
}
|
||||
}
|
||||
"#####,
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn doctest_convert_while_to_loop() {
|
||||
check_doc_test(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue