首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >锈蚀-分析器无法加载工作区,因为依赖关系失败。

锈蚀-分析器无法加载工作区,因为依赖关系失败。
EN

Stack Overflow用户
提问于 2022-09-17 18:15:57
回答 1查看 311关注 0票数 0
代码语言:javascript
复制
[ERROR rust_analyzer::reload] failed to switch workspaces: 
rust-analyzer failed to load workspace: 
Failed to read Cargo metadata from Cargo.toml file 
/home/supreetsingh/Documents/SavedPrograms/Rust/remind-me/Cargo.toml,
cargo 1.57.0-nightly (7fbbf4e8f 2021-10-19): Failed to run `cargo metadata --manifest-path
/home/supreetsingh/Documents/SavedPrograms/Rust/remind-me/Cargo.toml`: `cargo metadata` exited with an error: Updating crates.io index error: failed to select a version for the requirement `phf = "^0.11"` 
candidate versions found which didn't match: 0.10.1, 0.10.0, 0.9.0, ... location searched: crates.io index required by package `tokio-postgres v0.7.7` ... which satisfies dependency `tokio-postgres = "^0.7.7"` (locked to 0.7.7) of package `postgres v0.19.4` ... which satisfies dependency `postgres = "^0.19.4"` (locked to 0.19.4) of package `remind-me v0.1.0 (/home/supreetsingh/Documents/SavedPrograms/Rust/remind-me)

因此,这个问题只是在我的一个锈蚀项目中出现的。货在路上,当我在我的项目中添加一个新的依赖项时,这个问题就出现了,现在我被困在这个项目中了。我试着在网上寻找答案,但还没有找到成功的答案,我不知道下一步还能尝试什么。

cargo metadata --manifest-path <path to the file>在控制台中工作,我不知道为什么现在不工作。

我在Manjaro上运行这个程序,我的文本编辑器是Vim,YouCompleteMe用于AutoComplete。

如果有人能指出依赖的问题所在,我会非常感激的。

谢谢。

EN

回答 1

Stack Overflow用户

发布于 2022-09-17 20:31:46

phf 0.11需要锈蚀1.60。您需要更新您的Rust编译器,至少将其更新为该版本,或者遵循依赖链,并降低postgres机箱的级别,这样就不需要phf 0.11。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73757429

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档