From 1a9b1b8cccdffa6d91c0ebec773ff433abd64128 Mon Sep 17 00:00:00 2001 From: Young-Flash Date: Wed, 3 Jan 2024 20:07:53 +0800 Subject: [PATCH] test: add test case for TupleField --- .../handlers/extract_struct_from_enum_variant.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/crates/ide-assists/src/handlers/extract_struct_from_enum_variant.rs b/crates/ide-assists/src/handlers/extract_struct_from_enum_variant.rs index 074b8b79328..65e2a018477 100644 --- a/crates/ide-assists/src/handlers/extract_struct_from_enum_variant.rs +++ b/crates/ide-assists/src/handlers/extract_struct_from_enum_variant.rs @@ -466,6 +466,21 @@ enum Foo { Bar(Bar), Nil, } +"#, + ); + check_assist( + extract_struct_from_enum_variant, + r#" +enum Foo { + Nil(Box$0, Arc>), +} +"#, + r#" +struct Nil(Box, Arc>); + +enum Foo { + Nil(Nil), +} "#, ); }