rust-lang / rust-lang/rust-analyzer
How to get --all-features to work again?
Open
Nobody has claimed this yet.
A-diagnostics
S-actionable
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Tried the suggestions in #3897 as well but no matter what I try I cannot get rust-analyzer to activate all features.
nvim_lsp.rust_analyzer.setup {
on_attach = custom_attach,
root_dir = nvim_lsp.util.root_pattern("Cargo.toml", "rust-project.json"),
settings = {
["rust-analyzer"] = {
["cargo"] = {
["allFeatures"] = true,
},
["checkOnSave"] = {
["allFeatures"] = true,
["extraArgs"] = {"--all-features"},
}
}
}
}

Currently at commit aa38fa1
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 reproducing the configuration using Cargo.toml or rust-project.json as the root and the shown rust-analyzer cargo.allFeatures and checkOnSave settings. Compare behavior at commit aa38fa1 and verify completion or diagnostics with all Cargo features enabled; done means the configuration reliably activates all features.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100