From 2dcbfefb0345c2dc4c1cf492fc4a06c4d478a037 Mon Sep 17 00:00:00 2001 From: Asuka Minato Date: Fri, 21 Nov 2025 21:06:32 +0900 Subject: [PATCH] update --- crates/ide-assists/src/tests/generated.rs | 50 +++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/crates/ide-assists/src/tests/generated.rs b/crates/ide-assists/src/tests/generated.rs index 160b31af0a..fd172c72e5 100644 --- a/crates/ide-assists/src/tests/generated.rs +++ b/crates/ide-assists/src/tests/generated.rs @@ -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(