-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
let ()
has a poor error message
#17821
Comments
It's a standard pattern type mismatch error, and seems pretty clear to me. What sort of message would you prefer? Is there a particular case of people writing |
To me, the fact that |
I see. Conceptually it's not much different from fn main() {
let (a, b) = 1i;
} which is more evidently a type mismatch. But I agree that it's not obvious |
Right, I was seeing it as unit, not a pattern. |
It's both. It's a pattern which matches the one and only value of the unit type. |
Agree with my past self, I've never seen anyone else run into this since. |
internal: Remove unnecessary CfgFlag definition in project-model
gives
Obviously,
()
isn't a valid name for a binding, but this message isn't very helpful.The text was updated successfully, but these errors were encountered: