rust-lang / rust-lang/rust-analyzer
Quick-Fix (and CTRL+TAB) suggestions show re-exports and import re-export instead of requested thing
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Notice how we have Report, yet the suggestion points to Report (use color_eyre::error::Error).
While color_eyre::error::Error an alias of color_eyre::error::Report, accepting this suggestion does not compile.
Re-export in eyre:
https://github.com/eyre-rs/eyre/blob/da84e8c624804d99bf23c6e315eaf584722f6027/eyre/src/lib.rs#L383
Same issue occurs with invoking Quick Fix:
->
rust-analyzer version: rust-analyzer version: 0.3.1748-standalone
rustc version: rustc 1.74.0 (79e9716c9 2023-11-13)
relevant settings: Not sure there are any
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 issue with the linked eyre re-export example and compare the completion suggestion with the Quick Fix result. Trace the completion and Quick Fix handling for re-exported items; done means both suggest the requested item rather than the re-export and the accepted import compiles.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100