rust - Visual Studio 代码警告 : RLS could not set RUST_SRC_PATH for Racer because it could not read the Rust sysroot

标签 rust visual-studio-code

我正在使用 visual studio code 练习 Rust 程序。

我总是收到以下警告。

警告:RLS 无法为 Racer 设置 RUST_SRC_PATH,因为它无法读取 Rust 系统根。

Warning screenshot

我应该怎么做才能解决这个错误?

最佳答案

查看 rust-lang-nursery/rls-vscode#224rust-lang-nursery/rls-vscode#167之前在 RLS VSCode 问题跟踪器上对此消息的讨论。

插件的自述文件列出了要求:

  • 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).

根据这两个线程中的评论,允许扩展权限管理最后两个要求修复了您看到的错误。

关于rust - Visual Studio 代码警告 : RLS could not set RUST_SRC_PATH for Racer because it could not read the Rust sysroot,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48978766/

相关文章:

rust - 从 map 中获取值(value)并在同一范围内修改 map

for-loop - Rust 正在跳过 for 循环

javascript - 如何使用 JSDoc 记录符号索引签名以符合 typescript ?

vue.js - 如何获取从 .vue 中的别名导入的模块方法的智能感知

visual-studio-code - 当指定的 WebView 面板在 VSCode 扩展键绑定(bind)贡献点中处于事件状态时,是否有任何上下文?

visual-studio-code - 尽管存在 eslint 文件并且设置已设置为在保存时修复,但 VSC 不会格式化代码

rust - Rust:在 “poll”中找不到 `impl std::future::Future`方法

rust - 具有多个生命周期的迭代器

rust - 如何附加到元组?

visual-studio-code - 使用 VS Code 时如何解决 Rust 中的 "unresolved import"?