Stream: t-compiler/wg-rls-2.0

Topic: rust-analyzer with rustc


nikomatsakis (May 05 2020 at 10:17, on Zulip):

I'm getting this when I try to run rust-analyzer on rustc now:

[ERROR rust_analyzer::main_loop] failed to load workspace: Failed to read Cargo metadata from Cargo.toml file /home/nmatsakis/versioned/rust-0/Cargo.toml: Failed to run `cargo metadata --manifest-path /home/nmatsakis/versioned/rust-0/Cargo.toml`: Error during execution of `cargo metadata`: error: failed to resolve patches for `https://github.com/rust-lang/cargo`

    Caused by:
      patch for `cargo` in `https://github.com/rust-lang/cargo` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678

Warning: can't set `version = Two`, unstable features are only available in nightly channel.
Warning: can't set `ignore = IgnoreList { path_set: {"src/doc/edition-guide", "src/doc/reference", "src/doc/rust-by-example", "/vendor/", "src/libstd/sys/cloudabi/abi/cloudabi.rs", "src/stdarch", "src/tools/cargo", "src/doc/book", "src/doc/embedded-book", "src/llvm-project", "src/tools/rustfmt", "src/doc/rustc-dev-guide", "build", "src/tools/miri", "src/tools/rust-installer", "src/doc/nomicon", "src/test", "src/tools/clippy", "src/tools/rls"}, rustfmt_toml_path: "" }`, unstable features are only available in nightly channel.
Warning: can't set `version = Two`, unstable features are only available in nightly channel.
Warning: can't set `ignore = IgnoreList { path_set: {"/vendor/", "src/llvm-project", "src/doc/book", "build", "src/tools/rustfmt", "src/tools/rls", "src/libstd/sys/cloudabi/abi/cloudabi.rs", "src/stdarch", "src/doc/rustc-dev-guide", "src/doc/embedded-book", "src/tools/clippy", "src/doc/rust-by-example", "src/tools/cargo", "src/doc/edition-guide", "src/tools/rust-installer", "src/test", "src/tools/miri", "src/doc/reference", "src/doc/nomicon"}, rustfmt_toml_path: "" }`, unstable features are only available in nightly channel.

Any idea what's going on?

bjorn3 (May 05 2020 at 10:21, on Zulip):

Have you set a rustup nightly override for the project dir?

matklad (May 05 2020 at 10:21, on Zulip):

Seems not-specific to rust-analyzer, cargo metadata --manifest-path /home/nmatsakis/versioned/rust-0/Cargo.toml should fail fromt he command line as well I think

matklad (May 05 2020 at 10:22, on Zulip):

I bet that commenting out this:

https://github.com/rust-lang/rust/blob/de27cd7649e4182c63c770d18a561bda0d88cfc6/Cargo.toml#L44-L50

should "fix"

matklad (May 05 2020 at 10:22, on Zulip):

Not sure what's the underling issue, but my two guesses:

Last update: May 29 2020 at 17:50UTC