我正在使用 visual studio code 练习 Rust 程序。
我总是收到以下警告。
警告:RLS 无法为 Racer 设置 RUST_SRC_PATH,因为它无法读取 Rust 系统根。
我应该怎么做才能解决这个错误?
最佳答案
查看 rust-lang-nursery/rls-vscode#224和 rust-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/