rust-lang / rust-lang/rust-analyzer
"Fill struct fields" should insert fields in the same order as in struct's definition
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
struct Struct {
field: String,
field_added_later: i32,
other_field: bool,
}
fn main() {
let test = Struct {
field: "test".to_string(),
other_field: true,$0
};
}
->
struct Struct {
field: String,
field_added_later: i32,
other_field: bool,
}
fn main() {
let test = Struct {
field: "test".to_string(),
field_added_later: todo!(),
other_field: true,
};
}
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.
Research direction
The issue does not name files, tests, or an entry point. Locate the implementation and tests for the “Fill struct fields” assist, then reproduce the example and verify that inserted fields follow their declaration order while preserving existing field values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100