rust-lang / rust-lang/rust-analyzer
Quick Fix options for implementing individual default members
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Currently there's a quick fix to add implementations for all default members (think trait impl). This is pretty awkward when you only want to add an override for one of them as it will implement all of them (which could be a ton of code) and then you need to figure out which of the ones it added you didn't actually want (i.e. you need to distinguish between three sets: (1) things that were already there, (2) new things that you actually want to change and (3) new things that you want to keep default).
Ideally (I think) the quick fix menu would include one item for each of the default members to add just the implementation of that.
For Intellij (in Java) I would've done this using the "Override methods" action. Here's a clip of that UI: 
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
Start by locating the quick fix that adds implementations for all default members and trace how its available actions are constructed. Add separate actions for individual default members, then verify that selecting one adds only that implementation while preserving the existing behavior for the all-members action.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100