add test case for nested generic arg with Self

This commit is contained in:
Young-Flash 2023-12-27 19:55:36 +08:00
parent a38a79e2ba
commit 6a7d3f1c3e

View file

@ -461,6 +461,23 @@ enum Foo {
r#"
struct Bar{ node: Box<Foo> }
enum Foo {
Bar(Bar),
Nil,
}
"#,
);
check_assist(
extract_struct_from_enum_variant,
r#"
enum Foo {
Bar $0{ node: Box<Self>, a: Arc<Box<Self>> },
Nil,
}
"#,
r#"
struct Bar{ node: Box<Foo>, a: Arc<Box<Foo>> }
enum Foo {
Bar(Bar),
Nil,