mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
add test case for nested generic arg with Self
This commit is contained in:
parent
a38a79e2ba
commit
6a7d3f1c3e
1 changed files with 17 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue