使用 VS Code 时出现此错误rust-analyzer
,尽管cargo build
构建项目时没有错误或警告。
rustc
版本:1.54.0
我想留在“稳定”rustc
版本,而不是转向“夜间”。
使用 VS Code 时出现此错误rust-analyzer
,尽管cargo build
构建项目时没有错误或警告。
rustc
版本:1.54.0
我想留在“稳定”rustc
版本,而不是转向“夜间”。
更新rustc
以解决此问题并确保 Visual Studio Code 使用正确的 Rust 编译器。
rustup update
更新rustc
rust-analyzer
:确保ctrl+p -> Rust Analyzer: Show RA Version
显示rust-analyzer version: 183ef048f 2021-11-22 stable
.cargo clean
以清除过时的编译器输出这应该可以解决问题。如果没有,请看这里。