rust-lang / rust-lang/rust-analyzer
Import quick fix offers duplicate options
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
When there is an unresolved symbol that exists in multiple namespaces at an available import path, rust-analyzer suggests both despite the use statement for them being identical. For example, for an unresolved #[instrument], RA offers tracing::instrument twice in this quick fix because it is both a macro and a module within tracing.
rust-analyzer version: 0.3.1689-standalone
rustc version: 1.73.0-beta.6 (9b9539791 2023-09-17)
relevant settings: 🤷🏼
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
Reproduce the unresolved #[instrument] completion and inspect the import quick-fix path that creates its suggestions. Compare the macro and module candidates, then verify that identical use statements are presented only once; add or run a regression test if the relevant test area is found.
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
- 45/100