Closed OleStrohm closed 4 months ago
So the current version of Rust Analyzer is 2024-03-04. Could you try updating? I am unable to reproduce. But I am getting a regular compiler error due to split_once
accepting a FnMut
not a u8. I am on
rust-analyzer version: 0.4.1874-standalone (2397e7a88 2024-03-08)
The compiler warning doesn't matter too much, I didn't see it because RA wasn't working :P I managed to upgrade to rust-analyzer 1.78.0-nightly (46b180e 2024-03-08) (I also tested 2024-02-04, and it doesn't seem to panic, but I do have another issue which is that completion doesn't work at all, and there's a lot of errors like this in the log, which explain the issue at least:
[ERROR rust_analyzer::main_loop] flycheck 0: File with cargo diagnostic not found in VFS: file not found: /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/string.rs
[ERROR rust_analyzer::main_loop] flycheck 0: File with cargo diagnostic not found in VFS: file not found: /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/slice/mod.rs
This might be a NixOS issue though, which makes it impossible to test whether this happens on those versions. I'll keep trying.
Alright after a bit more difficulty I've managed to verify that I still run into this on rust-analyzer 1.78.0-nightly (46b180e 2024-03-08)
I can confirm I have recently started seeing this as well. Ubuntu 2022, 1.76.0-stable
There have been some fixes to exhaustiveness check panics. Please open a new issue with a new backtrace if you still run into this on the latest version.
rust-analyzer version: rust-analyzer 2024-02-26
rustc version: rustc 1.75.0
relevant settings: This is on NixOS, and these are the latest unstable packages
repository link: https://github.com/OleStrohm/codecrafters-git-rust/tree/151cbf86149e5e06894f317a4573c806343732ed
Notes on setup: This is on NixOS, using the latest unstable packages for cargo, rustc, rust-analyzer etc. on a Neovim (v0.10.0-dev-39928a7) using the builtin lsp client.
How to reproduce: I haven't been able to isolate any individual thing that causes the issue to appear, but it works fine for a minute or two, but eventually it just stops giving any further diagnostics and then gives some errors that are similar to the ones below
RA Log:
LSP Log
```rust [START][2024-03-09 19:32:47] LSP logging initiated 2024-03-09T19:32:47.553380Z ERROR rust_analyzer::main_loop: flycheck 0: File with cargo diagnostic not found in VFS: file not found: /build/rustc-1.75.0-src/library/core/src/slice/mod.rs 2024-03-09T19:32:47.553433Z ERROR rust_analyzer::main_loop: flycheck 0: File with cargo diagnostic not found in VFS: file not found: /build/rustc-1.75.0-src/library/core/src/slice/mod.rs Panic context: > fetch_native_diagnostics thread 'Worker' panicked at /build/rust-analyzer-unwrapped-2024-02-26-vendor.tar.gz/ra-ap-rustc_pattern_analysis/src/constructor.rs:947:63: called `Option::unwrap()` on a `None` value stack backtrace: 0: rust_begin_unwind 1: core::panicking::panic_fmt 2: core::panicking::panic 3: ra_ap_rustc_pattern_analysis::constructor::ConstructorSet