rustc hangs in trait solver due to infinite recursion in generic tuple implementation
Open
Nobody has claimed this yet.
C-bug
E-needs-bisection
I-hang
S-has-mcve
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I tried this code:
trait MutableBinding {}
impl<T> MutableBinding for T
where
(W, T, W, T): MutableBinding,
{}
impl<
T: ,
U: ,
V: ,
W: MutableBinding,
> MutableBinding for (T, U, V, W) {}
fn main(){}
I expected to see this happen: The compiler should report an error (e.g. recursion limit reached or undefined type W) instead of hanging.
Instead, this happened: The compiler enters an infinite loop (hangs) during trait resolution . both in next solver and new solver.
Meta
rustc --version --verbose:
rustc 1.93.0 (254b59607 2026-01-19)
binary: rustc
commit-hash: 254b59607d4417e9dffbc307138ae5c86280fe4c
commit-date: 2026-01-19
host: x86_64-unknown-linux-gnu
release: 1.93.0
LLVM version: 21.1.8
Backtrace
<backtrace>
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 compiling the supplied reproducer with rustc 1.93.0 and tracing the trait-resolution path in both the next and new solvers, where the report says the hang occurs. Done means the compiler terminates with a diagnostic such as a recursion-limit or undefined-type error rather than looping.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100