mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-29 06:23:25 +00:00
test: add test case for TupleField
This commit is contained in:
parent
099c3204a2
commit
1a9b1b8ccc
1 changed files with 15 additions and 0 deletions
|
@ -466,6 +466,21 @@ enum Foo {
|
||||||
Bar(Bar),
|
Bar(Bar),
|
||||||
Nil,
|
Nil,
|
||||||
}
|
}
|
||||||
|
"#,
|
||||||
|
);
|
||||||
|
check_assist(
|
||||||
|
extract_struct_from_enum_variant,
|
||||||
|
r#"
|
||||||
|
enum Foo {
|
||||||
|
Nil(Box$0<Self>, Arc<Box<Self>>),
|
||||||
|
}
|
||||||
|
"#,
|
||||||
|
r#"
|
||||||
|
struct Nil(Box<Foo>, Arc<Box<Foo>>);
|
||||||
|
|
||||||
|
enum Foo {
|
||||||
|
Nil(Nil),
|
||||||
|
}
|
||||||
"#,
|
"#,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue