rust-analyzer:无法写入请求:管道损坏(操作系统错误 32)

Tho*_*rge 4 rust visual-studio-code rust-analyzer

尽管构建项目时没有错误或警告,rust-analyzer但 VS Code出现此错误。cargo build

rustc版本:1.54.0

我想保留“稳定”rustc版本,而不是切换到“夜间”版本。

Tho*_*rge 7

更新rustc 以修复此问题并确保 Visual Studio Code 使用正确的 Rust 编译器。

  1. 运行rustup update更新rustc
  2. 检查使用的版本rust-analyzer:确保ctrl+p -> Rust Analyzer: Show RA Version显示rust-analyzer version: 183ef048f 2021-11-22 stable或更高版本。
  3. 运行cargo clean以清除过时的编译器输出
  4. 关闭所有VS Code 窗口并再次打开它们。

这应该可以解决问题。如果没有,请看这里