Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/tests/generated.rs')
-rw-r--r--crates/ide-assists/src/tests/generated.rs25
1 files changed, 23 insertions, 2 deletions
diff --git a/crates/ide-assists/src/tests/generated.rs b/crates/ide-assists/src/tests/generated.rs
index dd994ef4a6..46688a22f3 100644
--- a/crates/ide-assists/src/tests/generated.rs
+++ b/crates/ide-assists/src/tests/generated.rs
@@ -956,9 +956,9 @@ pub use foo::{Bar, Baz};
}
#[test]
-fn doctest_expand_rest_pattern() {
+fn doctest_expand_record_rest_pattern() {
check_doc_test(
- "expand_rest_pattern",
+ "expand_record_rest_pattern",
r#####"
struct Bar { y: Y, z: Z }
@@ -977,6 +977,27 @@ fn foo(bar: Bar) {
}
#[test]
+fn doctest_expand_tuple_struct_rest_pattern() {
+ check_doc_test(
+ "expand_tuple_struct_rest_pattern",
+ r#####"
+struct Bar(Y, Z);
+
+fn foo(bar: Bar) {
+ let Bar(..$0) = bar;
+}
+"#####,
+ r#####"
+struct Bar(Y, Z);
+
+fn foo(bar: Bar) {
+ let Bar(_0, _1) = bar;
+}
+"#####,
+ )
+}
+
+#[test]
fn doctest_extract_constant() {
check_doc_test(
"extract_constant",