rust-lang / rust-lang/rust-analyzer
Code action to convert between struct types
Open
@asukaminato0721 is already working on this.
Since Nov 28, 2025.
A-assists
C-feature
E-easy
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
struct S {} // Convert into unit struct
struct S; // Convert into normal struct
struct S { field: String }; // Convert into tuple struct
struct S(String); // Convert into normal struct
struct S(String, u64); // Convert into normal struct
struct S {
field_1: String, // These can be renamed easily later on
field_2: u64
}
I think that this would aid in refactoring in a big way, especially for tuple -> named structs.
It's a pain to fix them manually.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.