Invalid type inference with Fn and Closures #46742
Labels
A-closures
Area: Closures (`|…| { … }`)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code compiles just fine:
If we comment out the Sub-line, a compilation error is thrown:
I previously submitted this issue in #34511 (comment) , but @cramertj pointed out that this is not related to impl Trait. He also modified the example to the above code. Thus, I create this issue to move the discusson away from the impl Trait tracking issue.
/cc @eddyb @nikomatsakis
The text was updated successfully, but these errors were encountered: