Compiler hangs indefinitely when using associated types instead of their explicit type. #95402
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-trait-system
Area: Trait system
C-bug
Category: This is a bug.
fixed-by-next-solver
Fixed by the next-generation trait solver, `-Znext-solver`.
I-hang
Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: successful compilation.
Instead, this happened: The compiler hung and did not make any progress (i let it run for at least 5 minutes).
A slight modification of the above code results in it compiling without a problem:
line diffs:
so the total modified code is:
And that compiles without issues.
I searched through some issues and found #91498, the problem mentioned in this comment seems related, however in my case the complier does not emit an error.
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: