rust-lang / rust-lang/rust-analyzer
[feat] Should support `quickfix` adding missing feature
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Problem
Currently, fix missing feature does not support quick fix.
failed to resolve: could not find `X` in `Y` the item is gated behind the `Z` feature
error[E0433]: failed to resolve: could not find `X` in `Y`
...
note: found an item that was configured out
= note: the item is gated behind the `Z` feature
No quick fixes available
Currently
Need 5 human steps to fix
-
Click for full compiler diagnostic
-
Copy feature name
Z, remember depedency nameY -
Find
Cargo.toml -
Open
Cargo.toml, locateCargo.tomldependencies fieldY -
Alter
Y = "1.2.3"toY = { version = "1.2.3", features = ["Z"] }
Feat
Should support quickfix adding missing feature
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 tracing rust-analyzer's handling of the shown compiler diagnostic and its quick-fix generation; the issue identifies Cargo.toml and the dependency feature syntax as the target configuration. The work is done when a diagnostic identifying dependency Y and feature Z offers a quick fix that adds Z to Y's dependency declaration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100