Bad error message when closure parameter type can't be inferred #71732
Labels
A-closures
Area: Closures (`|…| { … }`)
A-diagnostics
Area: Messages for errors, warnings, and lints
A-inference
Area: Type inference
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This is either a regression of #45685 or it was closed prematurely.
Fairly minimal reproducer:
->
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=c8754ceba0148a4da807002ae99ffa25
I'm still not entirely sure what is actually wrong here - is it the lifetime as in #22340? Anyhow - the message doesn't refer to any T that needs to be specified, and the named explicit type is not sufficient to fix the issue even when given.
Happens with nightly too.
The text was updated successfully, but these errors were encountered: