Duet Dusha
Duet Dusha

Reputation: 11

Rust-analyzer failed to load workspace

rust-analyzer failed to load workspace: Failed to read Cargo metadata from Cargo.tml file /home/eth/Downloads/testing/Cargo.toml, cargo 1.33.0-nightly (0d1f1bbea 2018-12-19): Failed to run '"cargo" "metadata" "--format-version" "1" "--manifest-path" "/home/eth/Downloads/testing/Cargo.toml" "--filter-platform" "x86_64-unknown-linux-gnu"': 'cargo metadata' exited with an error: error: Found argument '--filter-platform' which wasn't expected, or isn't valid in this context

I needed to reinstall my OS few days back, and when I installed and configured my plugins in NeoVim - CoC is being used for code suggestion -, that error came out. I believe that's not a NeoVim/CoC problem, that's why I tagged it so. I don't have much experience dealing with that kinda stuff, so I don't even know what else information I could provide...

Upvotes: 0

Views: 7958

Answers (1)

Chayim Friedman
Chayim Friedman

Reputation: 70960

Update Rust.

rust-analyzer invokes the command cargo metadata with the flag --filter-platform. This flag was added in Rust 1.41.0. Since you're using an older Rust version (1.33.0), Cargo complains.

Upvotes: 2

Related Questions