rust-lang / rust-lang/rust-analyzer
hightlight: panic: 'Coroutine(InternedCoroutineId(InternedCoroutineId has parameters, but no args were provided in instantiate
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
trait Lam {
type E;
}
impl Lam for () {
type E = impl std::marker::Copy;
fn foo<T>() -> Self::E {
async {}
}
}
rust-analyzer higlight < code.rs
thread 'main' (3087536) panicked at /cargo/registry/25cdd57fae9f0462/ra-ap-rustc_type_ir-0.166.0/src/binder.rs:654:13:
Coroutine(InternedCoroutineId(InternedCoroutineId { loc: InternedClosure { owner: DefWithBodyId(FunctionId(FunctionId(0880))), expr: Idx::<Expr>(1), kind: Coroutine { kind: Async, source: Block } } }), [#0, (), (), (), (), ()]) has parameters, but no args were provided in instantiate
stack backtrace:
0: 0x7ffa35ed4756 - <<std[e0bacc3b9b9ed5de]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[485db03f8d737dbc]::fmt::Display>::fmt
1: 0x7ffa366081cf - core[485db03f8d737dbc]::fmt::write
2: 0x7ffa35ee982c - <std[e0bacc3b9b9ed5de]::sys::stdio::unix::Stderr as core[485db03f8d737dbc]::io::write::Write>::write_fmt
3: 0x7ffa35ea6ffa - std[e0bacc3b9b9ed5de]::panicking::default_hook::{closure#0}
4: 0x7ffa35ec8a53 - std[e0bacc3b9b9ed5de]::panicking::default_hook
5: 0x7ffa35ec8ebb - std[e0bacc3b9b9ed5de]::panicking::panic_with_hook
6: 0x7ffa35ea70b2 - std[e0bacc3b9b9ed5de]::panicking::panic_handler::{closure#0}
7: 0x7ffa35e9ff19 - std[e0bacc3b9b9ed5de]::sys::backtrace::__rust_end_short_backtrace::<std[e0bacc3b9b9ed5de]::panicking::panic_handler::{closure#0}, !>
8: 0x7ffa35ea8c8d - __rustc[4a96d59a2e5de69a]::rust_begin_unwind
9: 0x7ffa32b16efc - core[485db03f8d737dbc]::panicking::panic_fmt
10: 0x55abef160019 - <hir_ty[3108a0a459e1527d]::infer::InferenceContext>::handle_opaque_type_uses
11: 0x55abef2540a8 - hir_ty[3108a0a459e1527d]::infer::infer_finalize
12: 0x55abef25cd60 - hir_ty[3108a0a459e1527d]::infer::infer_query_with_inspect
13: 0x55abef120f73 - <salsa[1b329f7e4af845ab]::function::IngredientImpl<<hir_ty[3108a0a459e1527d]::infer::InferenceResult>::for_body::_::for_body__Configuration_>>::execute
14: 0x55abeef2a59a - <salsa[1b329f7e4af845ab]::attach::Attached>::attach::<dyn hir_ty[3108a0a459e1527d]::db::HirDatabase, &hir_ty[3108a0a459e1527d]::infer::InferenceResult, <hir_ty[3108a0a459e1527d]::infer::InferenceResult>::for_body::for_body_::{closure#0}>
15: 0x55abeeb8a7ac - <hir[490d9e13e9aaa6e]::semantics::SemanticsImpl>::get_unsafe_ops
16: 0x55abef4d68a7 - ide[de125b39d1b604ec]::syntax_highlighting::highlight
17: 0x55abef513361 - ide[de125b39d1b604ec]::syntax_highlighting::html::highlight_as_html_with_config
18: 0x55abef47abac - <ide[de125b39d1b604ec]::Analysis>::highlight_as_html
19: 0x55abeff302c2 - <rust_analyzer[e4727c150b94e613]::cli::flags::Highlight>::run
20: 0x55abf0167ef2 - rust_analyzer[1acd1aa180fd1ff]::main
21: 0x55abf0163f23 - std[e0bacc3b9b9ed5de]::sys::backtrace::__rust_begin_short_backtrace::<fn() -> core[485db03f8d737dbc]::result::Result<std[e0bacc3b9b9ed5de]::process::ExitCode, anyhow[2d19dd9a87344cb0]::Error>, core[485db03f8d737dbc]::result::Result<std[e0bacc3b9b9ed5de]::process::ExitCode, anyhow[2d19dd9a87344cb0]::Error>>
22: 0x55abf0165ed2 - std[e0bacc3b9b9ed5de]::rt::lang_start::<core[485db03f8d737dbc]::result::Result<std[e0bacc3b9b9ed5de]::process::ExitCode, anyhow[2d19dd9a87344cb0]::Error>>::{closure#0}
23: 0x7ffa379d074e - std[e0bacc3b9b9ed5de]::rt::lang_start_internal
24: 0x55abf017e838 - main
25: 0x7ffa30a27781 - <unknown>
26: 0x7ffa30a278b9 - __libc_start_main
27: 0x55abeea87e19 - <unknown>
28: 0x0 - <unknown>
'rust-analyzer 1.100.0-nightly (f0bbd8d 2026-09-07)'
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
Start by reproducing the panic with the inline Rust snippet and rust-analyzer highlight <code.rs>. Trace the reported path through hir_ty::infer::handle_opaque_type_uses, hir_ty::infer::infer_finalize, and ide::syntax_highlighting::highlight. Done means the same input completes highlighting without panicking and the regression is covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100