'rust-analyzer failed to load workspace: Failed to read Cargo metadata from Cargo.toml file e:\rustBlog\server\Cargo.toml
enter image description here **I create rust project by "cargo new [name]" and install rust-analyzer in vsCode.But when I open the project by vscode,there's an error "rust-analyzer failed to load workspace: Failed to read Cargo metadata from Cargo.toml file e:\rustBlog\server\Cargo.toml, cargo 1.60.0 (d1fd9fe2c 2022-03-01): Failed to parse edition 2021: invalid edition: "2021"".How to resolve it? **
cargo --version 1.60.0
rustc --version 1.60.0
rust-analyzer version 0.2.297
Solution 1:[1]
I resolve it by update vsCode to newest version "1.67.1" and uninstall vscode extension named "Rust".The two of them are in conflict!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |