Argument with type impl FnMut
combined with recursion and closures causes inifinite recursion in compiler
#130806
Labels
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: Code compiles and generates 2 versions of function
gen
.Instead, this happened: compiler errors by reaching recursion limit. Increasing recursion limit causes stack overflow.
Error message:
Link to playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=571ea952b43ae93438a8f4bf9c2b0ec3
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: