Hi there. I'm running Windows 10, VS Code.
My problem is this: rust-analyzer wants to run the command:
cargo metadata --manifest-path .\path\to\Cargo.toml --filter-platform <something>
However, I have a rust-toolchain.toml
like so:
[toolchain]
channel = "nightly-2019-01-06"
The resulting Cargo version does not have a --filter-platform
flag:
$ cargo --version
cargo 1.33.0-nightly (34320d212 2019-01-03)
$ cargo help metadata | grep filter-platform
<null output>
Unfortunately cargo metadata
for my toolchain version does not have a --filter-platform
flag. This results in the following error:
rust-analyzer failed to load workspace: Failed to read Cargo metadata from Cargo.toml file c:\projects\my-project\Cargo.toml, cargo 1.33.0-nightly (34320d212 2019-01-03): Failed to run `cargo metadata --manifest-path c:\projects\my-project\Cargo.toml` in `c:\projects\my-project\`: `cargo metadata` exited with an error: error: Found argument '--filter-platform' which wasn't expected, or isn't valid in this context
So it seems like I need to be able to customize the cargo metadata
flags. Either that or turn off the cargo metadata
invocation rust-analyzer performs. I have toggled off the Cargo: Autoreload
feature in VS Code, but I still get these regular error pop-ups.
Is there anything I can do? Or should I open an issue on Github?