Skip to content

Commit 1a9b1b8

Browse files
committed
test: add test case for TupleField
1 parent 099c320 commit 1a9b1b8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

crates/ide-assists/src/handlers/extract_struct_from_enum_variant.rs

+15
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,21 @@ enum Foo {
466466
Bar(Bar),
467467
Nil,
468468
}
469+
"#,
470+
);
471+
check_assist(
472+
extract_struct_from_enum_variant,
473+
r#"
474+
enum Foo {
475+
Nil(Box$0<Self>, Arc<Box<Self>>),
476+
}
477+
"#,
478+
r#"
479+
struct Nil(Box<Foo>, Arc<Box<Foo>>);
480+
481+
enum Foo {
482+
Nil(Nil),
483+
}
469484
"#,
470485
);
471486
}

0 commit comments

Comments
 (0)