Reputation: 10163
I'm using visual studio code for practicing rust programs.
I'm getting the below warning always.
warning: RLS could not set RUST_SRC_PATH for Racer because it could not read the Rust sysroot.
What should I do to resolve this error?
Upvotes: 3
Views: 2081
Reputation: 6151
For me what helped was to add this in VS Code settings.json (Quick Menu -> Preferences: Open Settings (JSON) or via menu)
{
"rust-client.channel": "stable"
}
Upvotes: 1
Reputation: 10993
Check out rust-lang-nursery/rls-vscode#224 and rust-lang-nursery/rls-vscode#167 for previous discussion of this message on the RLS VSCode issue tracker.
The plugin's readme lists the requirements:
- Rustup,
- A Rust toolchain (the extension will configure this for you, with permission),
- RLS (currently rls-preview), rust-src, and rust-analysis components (the extension will install these for you, with permission).
And based on the comments in those two threads, allowing the extension permission to manage the last two requirements fixes the error you saw.
Upvotes: 2