-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Passing a lifetime GAT to a closure can cause the compiler to run indefinitely #108826
Copy link
Copy link
Open
Labels
A-GATsArea: Generic associated types (GATs)Area: Generic associated types (GATs)C-bugCategory: This is a bug.Category: This is a bug.I-hangIssue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.fixed-by-next-solverFixed by the next-generation trait solver, `-Znext-solver`.Fixed by the next-generation trait solver, `-Znext-solver`.
Metadata
Metadata
Assignees
Labels
A-GATsArea: Generic associated types (GATs)Area: Generic associated types (GATs)C-bugCategory: This is a bug.Category: This is a bug.I-hangIssue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.fixed-by-next-solverFixed by the next-generation trait solver, `-Znext-solver`.Fixed by the next-generation trait solver, `-Znext-solver`.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
I tried to pair it down more, but so far this is the smallest version I could get to cause the issue:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=5042463788e49bf6964dfa80dcb5b9bb
Meta
rustc --version --verbose:and
Error output
There isn't any error output, since the compiler runs indefinitely when encountering this issue.