Skip to content

Commit 6a7d3f1

Browse files
committed
add test case for nested generic arg with Self
1 parent a38a79e commit 6a7d3f1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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

+17
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,23 @@ enum Foo {
461461
r#"
462462
struct Bar{ node: Box<Foo> }
463463
464+
enum Foo {
465+
Bar(Bar),
466+
Nil,
467+
}
468+
"#,
469+
);
470+
check_assist(
471+
extract_struct_from_enum_variant,
472+
r#"
473+
enum Foo {
474+
Bar $0{ node: Box<Self>, a: Arc<Box<Self>> },
475+
Nil,
476+
}
477+
"#,
478+
r#"
479+
struct Bar{ node: Box<Foo>, a: Arc<Box<Foo>> }
480+
464481
enum Foo {
465482
Bar(Bar),
466483
Nil,

0 commit comments

Comments
 (0)