-
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
mismatched types: expected fn&() -> !
but found fn&() -> _|_
#3681
Comments
Agreed. The current type checker has two ways to represent the same thing, which I think is what is leading to this problem. I've been thinking we oughta' fix that for some time, this bug gives me a good justification. =) |
Specifically: fn types have a |
The reason we have both is that |
The most conservative fix here would be a way to infer the |
This should be fixed. |
This fails:
with
While this works:
I don't know what is going on there but I feel the first snippet should work too.
The text was updated successfully, but these errors were encountered: