rust-lang / rust-lang/rust-analyzer
Make "discover" the default for rust-analyzer.rustc.source?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Currently, to get RA to work on a project that uses rustc-private crates, one has to do two things:
- add a snippet to the Cargo.toml (as in https://github.com/rust-lang/miri/pull/1736)
- add
"rust-analyzer.rustc.source": "discover"to the vscode settings
I wonder if the 2nd step could be made unnecessary, by making discover the default value for rust-analyzer.rustc.source? If I understand https://github.com/rust-lang/miri/pull/1736#issuecomment-792979551 correctly, that setting has no negative effects on crates without rustc_private, and for crates with rustc_private it is the value one usually needs.
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 locating the configuration definition and default for rust-analyzer.rustc.source, then review how Cargo.toml rustc_private snippets and VS Code settings are handled. Verify that discover works for both rustc-private projects and ordinary crates, and confirm the default no longer requires the explicit VS Code setting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100