Closed
Description
rust-analyzer version: rust-analyzer version: 0.3.1766-standalone (457b966 2023-12-10)
rustc version: rustc 1.74.1 (a28077b28 2023-12-04)
relevant settings: Running within VSCode, on Windows 10 Pro 22H2, build: 19045.3803
Rust-analyzer thread panics on the assertion:
Panic context:
> fetch_native_diagnostics
thread 'Worker' panicked at crates\base-db\src\span.rs:154:9:
assertion failed: id.index() < Self::MAX_FILE_ID
stack backtrace:
0: std::panicking::begin_panic_handler
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library\std\src\panicking.rs:597
1: core::panicking::panic_fmt
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library\core\src\panicking.rs:72
2: core::panicking::panic
at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library\core\src\panicking.rs:127
3: hir_expand::ExpansionInfo::map_node_range_up
4: hir_expand::files::InFileWrapper<base_db::span::HirFileId,&rowan::api::SyntaxNode<syntax::syntax_node::RustLanguage>>::original_file_range
5: hir::semantics::SemanticsImpl::diagnostics_display_range
6: ide_diagnostics::adjusted_display_range
7: ide_diagnostics::handlers::type_mismatch::type_mismatch
8: ide_diagnostics::diagnostics
9: salsa::Cancelled::catch
10: ide::Analysis::diagnostics
11: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
12: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
13: rust_analyzer::diagnostics::fetch_native_diagnostics
14: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
I had copy the whole project files to my wsl distribution. Under ubuntu on wsl, it works fine, so I guess this issue concerns to the underlying windows 10.