Got this error with rust-analyzer
VS Code, although cargo build
builds the project without errors or warnings.
rustc
version: 1.54.0
I would like to stay on the "stable" rustc
version and not shift to "nightly".
Got this error with rust-analyzer
VS Code, although cargo build
builds the project without errors or warnings.
rustc
version: 1.54.0
I would like to stay on the "stable" rustc
version and not shift to "nightly".
Update rustc
to fix this and ensure that Visual Studio Code uses the correct Rust compiler.
rustup update
to update rustc
rust-analyzer
: Ensure that ctrl+p -> Rust Analyzer: Show RA Version
shows rust-analyzer version: 183ef048f 2021-11-22 stable
, or later.cargo clean
to clear obsoleted compiler outputThis should fix the issue. If not, have a look here.