rust-lang / rust-lang/rust-analyzer
Match arm assist is confused by use Enum::*
Open
Nobody has claimed this yet.
A-assists
A-pattern
E-unknown
S-actionable
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Match arm assist incorrectly detects missing match arms when enum members have multiple ways to be referenced (I suppose):

Code from repro:
enum Foo {
Bar
}
use Foo::*;
fn main() {
match Foo::Bar {
Foo::Bar => {}
}
}
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 running the supplied Rust reproduction in rust-analyzer and locating the match arm assist behavior it exercises. Confirm the assist does not report a missing arm when an enum variant is referenced through both Foo::Bar and use Foo::*; no specific source file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100