Compiler hangs when adding a `Send` trait bound to an HRTB associated type
Open
Nobody has claimed this yet.
C-bug
fixed-by-next-solver
I-hang
needs-triage
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I tried this code:
trait X<'a>
{
type U: ;
}
impl X<'_> for u32
where
for<'b> <Self as X<'b>>::U: Clone + Send + ,
{
type U = str;
}
fn main() {}
this hang does not occur if the -Z next-solver flag is used
Meta
rustc --version --verbose:
rustc 1.93.1 (01f6ddf75 2026-02-11)
binary: rustc
commit-hash: 01f6ddf7588f42ae2d7eb0a2f21d44e8e96674cf
commit-date: 2026-02-11
host: x86_64-unknown-linux-gnu
release: 1.93.1
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 reproducer with rustc and compare its behavior with and without the -Z next-solver flag. No repository file or test is named, so trace the compiler path handling the HRTB associated-type bounds; done means the example no longer hangs and behavior is covered by a regression test.
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
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100