rust-lang / rust-lang/rust-analyzer
ICE: "mut #0 has parameters, but no args were provided in instantiate" panic on completion popup with Arc<Mutex<T>>
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
rust-analyzer version
rust-analyzer 1.97.1 (8bab26f 2026-07-14)
rustc version
rustc 1.97.1 (8bab26f4f 2026-07-14)
editor or extension
Neovim
code snippet to reproduce:
use std::{
sync::{Arc, Mutex},
thread::{self, JoinHandle},
time::Duration,
};
fn main() {
let counter = Arc::new(Mutex::new(0));
let mut handles: Vec<JoinHandle<()>> = vec![];
for _ in 0..=10 {
let counter = Arc::clone(&counter);
let handle = thread::spawn(move || {
let mut num = counter.lock().unwrap();
*num += 1;
});
handles.push(handle);
}
for handle in handles {
handle.join().unwrap();
// println!("handle lengt: {}", handles.len());
thread::sleep(Duration::from_millis(500));
}
println!("Result: {}", *counter.lock().unwrap());
}
summary
rust-analyzer panics with the error whenever the completion/signature popup
appears while typing in a function that uses Arc<Mutex<T>> across threads:
https://github.com/user-attachments/assets/47cf0a39-77dc-48fd-88c3-e3ce2e42077a
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
The report names the completion/signature popup as the failing entry point and provides a Rust reproducer for Neovim. First reproduce the panic with the supplied Arc<Mutex> snippet, then trace completion handling around the reported instantiate error. Done means the popup no longer panics for this code and the regression is covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- neovim, rust
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100