[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。
如果有人能指出依赖的问题所在,我会非常感激的。
谢谢。
发布于 2022-09-17 20:31:46
phf 0.11需要锈蚀1.60。您需要更新您的Rust编译器,至少将其更新为该版本,或者遵循依赖链,并降低postgres机箱的级别,这样就不需要phf 0.11。
https://stackoverflow.com/questions/73757429
复制相似问题