Better error for missing tuple pattern in args #44150
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
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.
WG-diagnostics
Working group: Diagnostics
Playground link
Currently, this produces a somewhat confusing error:
which could potentially be improved for this common case (an N-tuple was expected, but the closure takes N arguments instead). This could extend to other cases where there is a tuple : multiple arguments mismatch.
The text was updated successfully, but these errors were encountered: