Rust-analyzer seems to "silently" fail

I've been using rust-analyzer for a while now (via Neovim and ALE). It's worked perfectly on my desktop, but I tried to set it up on my laptop with a nearly identical configuration. I don't get any errors from rustc/clippy like I would expect, with no obvious cause. I tried looking at the LSP's stderr and I found this:

[ERROR flycheck] Flycheck failed to run the following command: "cargo" "clippy" "--workspace" "--message-format=json" "--manifest-path" "/home/leo60228/data_expunged/Cargo.toml" "--all-targets"
[ERROR rust_analyzer::main_loop] cargo check failed: Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(ExitStatus(25856)))
[ERROR flycheck] Flycheck failed to run the following command: "cargo" "clippy" "--workspace" "--message-format=json" "--manifest-path" "/home/leo60228/data_expunged/Cargo.toml" "--all-targets"
[ERROR rust_analyzer::main_loop] cargo check failed: Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(ExitStatus(25856)))
[ERROR flycheck] Flycheck failed to run the following command: "cargo" "clippy" "--workspace" "--message-format=json" "--manifest-path" "/home/leo60228/data_expunged/Cargo.toml" "--all-targets"
[ERROR rust_analyzer::main_loop] cargo check failed: Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(ExitStatus(25856)))
[ERROR flycheck] Flycheck failed to run the following command: "cargo" "clippy" "--workspace" "--message-format=json" "--manifest-path" "/home/leo60228/data_expunged/Cargo.toml" "--all-targets"
[ERROR rust_analyzer::main_loop] cargo check failed: Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(ExitStatus(25856)))

cargo seems to be exiting with code 101, which would imply a panic. However, I can't find a panic message anywhere...

Never mind, this had nothing to do with rust-analyzer. Turns out I had an outdated manually-installed clippy, removing that seems to have made everything work again.

1 Like

It still feels like we can expose a better error message here.

You installed clippy again?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.