rust-lang / rust-lang/rust-analyzer
panic: `self.deferred_call_resolutions.is_empty()` missing `]`
Open
Nobody has claimed this yet.
C-bug
I-panic
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
const _: usize = _usize as [[]; (|| )()
RUSTFLAGS="" ~/.rustup/toolchains/master/bin/rust-analyzer highlight < code.rs
thread 'main' (3610025) panicked at src/tools/rust-analyzer/crates/hir-ty/src/infer/closure/analysis.rs:206:9:
assertion failed: self.deferred_call_resolutions.is_empty()
stack backtrace:
0: 0x7fc050a0a566 - <<std[7a677e1801b0b374]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[8947f86082328bb0]::fmt::Display>::fmt
1: 0x7fc05100ec88 - core[8947f86082328bb0]::fmt::write
2: 0x7fc050a1f9dc - <std[7a677e1801b0b374]::sys::stdio::unix::Stderr as core[8947f86082328bb0]::io::write::Write>::write_fmt
3: 0x7fc0509de8ea - std[7a677e1801b0b374]::panicking::default_hook::{closure#0}
4: 0x7fc0509fcc83 - std[7a677e1801b0b374]::panicking::default_hook
5: 0x7fc0509fd0eb - std[7a677e1801b0b374]::panicking::panic_with_hook
6: 0x7fc0509de9d4 - std[7a677e1801b0b374]::panicking::panic_handler::{closure#0}
7: 0x7fc0509d2e89 - std[7a677e1801b0b374]::sys::backtrace::__rust_end_short_backtrace::<std[7a677e1801b0b374]::panicking::panic_handler::{closure#0}, !>
8: 0x7fc0509e02fd - __rustc[3266c8557f45551c]::rust_begin_unwind
9: 0x7fc04d75c47c - core[8947f86082328bb0]::panicking::panic_fmt
10: 0x7fc04db907b2 - core[8947f86082328bb0]::panicking::panic
11: 0x562524a2e1bd - hir_ty[93cf116e5217208d]::infer::infer_finalize
12: 0x562524921812 - <salsa[f6baacb4446d11cc]::function::IngredientImpl<<hir_ty[93cf116e5217208d]::infer::InferenceResult>::for_anon_const::_::for_anon_const__Configuration_>>::execute
13: 0x562524900042 - <salsa[f6baacb4446d11cc]::function::IngredientImpl<<hir_ty[93cf116e5217208d]::infer::InferenceResult>::for_anon_const::_::for_anon_const__Configuration_>>::fetch
14: 0x562524714d0c - <std[7a677e1801b0b374]::thread::local::LocalKey<salsa[f6baacb4446d11cc]::attach::Attached>>::with::<salsa[f6baacb4446d11cc]::attach::attach<&hir_ty[93cf116e5217208d]::infer::InferenceResult, dyn hir_ty[93cf116e5217208d]::db::HirDatabase, <hir_ty[93cf116e5217208d]::infer::InferenceResult>::for_anon_const::for_anon_const_::{closure#0}>::{closure#0}, &hir_ty[93cf116e5217208d]::infer::InferenceResult>
15: 0x562524a29ed2 - hir_ty[93cf116e5217208d]::infer::infer_finalize
16: 0x562524a33a6f - hir_ty[93cf116e5217208d]::infer::infer_query_with_inspect
17: 0x5625249234a4 - <salsa[f6baacb4446d11cc]::function::IngredientImpl<<hir_ty[93cf116e5217208d]::infer::InferenceResult>::for_body::_::for_body__Configuration_>>::execute
18: 0x5625246ee377 - <salsa[f6baacb4446d11cc]::attach::Attached>::attach::<dyn hir_ty[93cf116e5217208d]::db::HirDatabase, &hir_ty[93cf116e5217208d]::infer::InferenceResult, <hir_ty[93cf116e5217208d]::infer::InferenceResult>::for_body::for_body_::{closure#0}>
19: 0x56252434dc3c - <hir[7d9bbb24bae6c127]::semantics::SemanticsImpl>::get_unsafe_ops
20: 0x562524cb8313 - ide[6233e951667d8107]::syntax_highlighting::highlight
21: 0x562524cf203e - ide[6233e951667d8107]::syntax_highlighting::html::highlight_as_html_with_config
22: 0x562524c58e4c - <ide[6233e951667d8107]::Analysis>::highlight_as_html
23: 0x5625256a7932 - <rust_analyzer[9f47c25af0fec260]::cli::flags::Highlight>::run
24: 0x5625259470f4 - rust_analyzer[9193986eb7972329]::main
25: 0x5625258dd7d3 - std[7a677e1801b0b374]::sys::backtrace::__rust_begin_short_backtrace::<fn() -> core[8947f86082328bb0]::result::Result<std[7a677e1801b0b374]::process::ExitCode, anyhow[6c3359fcb7bf7f47]::Error>, core[8947f86082328bb0]::result::Result<std[7a677e1801b0b374]::process::ExitCode, anyhow[6c3359fcb7bf7f47]::Error>>
26: 0x562525940142 - std[7a677e1801b0b374]::rt::lang_start::<core[8947f86082328bb0]::result::Result<std[7a677e1801b0b374]::process::ExitCode, anyhow[6c3359fcb7bf7f47]::Error>>::{closure#0}
27: 0x7fc05216b599 - std[7a677e1801b0b374]::rt::lang_start_internal
28: 0x562525960238 - main
29: 0x7fc04ba27741 - <unknown>
30: 0x7fc04ba27879 - __libc_start_main
31: 0x562524251709 - <unknown>
32: 0x0 - <unknown>
rust-analyzer 1.99.0-nightly (da80ed0 2026-07-14)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the panic with the rust-analyzer highlight command and the provided Rust snippet. Start at src/tools/rust-analyzer/crates/hir-ty/src/infer/closure/analysis.rs:206, then trace inference finalization and deferred call resolutions. Done means highlighting this input completes without the assertion panic, with regression coverage for the reproducer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100