rust-lang / rust-lang/rust-analyzer
Autocomplete of enum variants does not work in `vec![Enum_::|]` context
Open
Nobody has claimed this yet.
A-macro
C-bug
S-actionable
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
enum En {
Foo,
Bar,
}
fn yolo() {
// autocomplete works
let p = En::Foo;
// autocomplete do not works
let p = vec![En::|];
}
rust-analyzer version: latest master 0.0.0 (f64c95600 2022-09-12)
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 with the reported reproduction in the issue body and trace autocomplete handling for the vec![En::|] macro context, comparing it with the working En::Foo expression. Confirm the fix by checking that enum variants are suggested inside the vector macro invocation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100