rust-lang / rust-lang/rust-analyzer
`Fill match arms` assist ignores existing variants prefixed with `Self::`
Open
@ChayimFriedman2 is already working on this.
Since Jun 23, 2025.
A-assists
A-pattern
C-bug
S-actionable
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Right now if you have an enum that has some match arms and a match like this:
match x {
Self::V1 => todo!(),
Self::V2 => todo!(),
}
and you add a new variant and then run the fill match arms assist it will insert additional copies of V1 and V2 in the match arms that are prefixed with the types own name rather than Self.
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.