Boxed closures without explicit type info produces unhelpful error messages #20528
Labels
A-closures
Area: Closures (`|…| { … }`)
A-diagnostics
Area: Messages for errors, warnings, and lints
A-type-system
Area: Type system
����The following piece of code works fine:
However, if you leave out the explicit type information in the creation of the boxed closure, like this:
you get this rather unhelpful error message:
Maybe it should say something along the lines of
boxed closures require explicit type information
, or be able to infer the type by itself.The text was updated successfully, but these errors were encountered: