I just installed rustup and VSCode on MacOS Sierra today and when I use cargo to compile rust files it works fine but VSCode is giving me issues.
Couldn't start client Rust Language Server
Unexpected error initialising RLS - error running rustup
RLS could not set RUST_SRC_PATH for Racer because it could not read the Rust sysroot.
Same exact issue. Rls was working fine, then I upgraded to 1.33.0 and I get the same error.
Latest stable linux gnu toolchain, vscode 1.31.1, latest extension, components and rustup all updated
Same issue on macOS Mojave
stable-x86_64-apple-darwin (default)
beta-x86_64-apple-darwin
nightly-x86_64-apple-darwin
rustc --version
rustc 1.33.0 (2aa4c46cf 2019-02-28)
I also just encountered this on Windows 10 (I'm running on nightly). Here's a snapshot of the errors in the VS code devtools in case it helps:

EDIT: Seems that adding this to my settings.json resolved the issue for me:
"rust-client.channel": "nightly-x86_64-pc-windows-msvc"
In VS Code Click File > Preferences > Settings
At the top, search for rust, one of the settings should say "Edit in settings.json". Add the above snippet, using whichever channel is appropriate for you and restart VS code.
Thanks @rbudnar, that worked for me ("nightly-x86_64-apple-darwin" in my case).
Pooping the bed for me too on Linux. Will this ever become stable?
I also like when it crashes, but you still have to manually restart. Can't the plugin watch the stdout for error messages and just handle it?
I thought we were done with having to use nightly channels...
This is super frustratig. For the past few weeks I was wondering why code completion was getting worse and worse...
And using the nightly toolchain, now RLS can no longer figure out a project with a library and a bin. SO its useless again. UGH
I think you should be able to use stable if you choose. I just so happen to use nightly, so that's what I pasted in there as an example.
Can confirm, stable channel works fine. The issue is that the automatic toolchain name parsing is including (default) in the command to rustup when it shouldn't be.
I have the same issue. Thanks @rbudnar for the solution.
This is related to rustup version 1.17.0 changing its UI for improving things for humans.
I think you should be able to use stable if you choose. I just so happen to use nightly, so that's what I pasted in there as an example.
Confirmed.
I literally had JUST installed Rust to start out and ran into this.
Simply putting "rust-client.channel": "stable" solved the issue. No need for nightly.
cc #522
Fixed in 0.5.4
"rust-client.rustupPath": "~/.cargo/bin/rustup"
did the trick for me 馃槂
"rust-client.rustupPath": "~/.cargo/bin/rustup"did the trick for me 馃槂
It works for me.
Most helpful comment
Confirmed.
I literally had JUST installed Rust to start out and ran into this.
Simply putting
"rust-client.channel": "stable"solved the issue. No need for nightly.