-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix missing match arm false positive for enum with no variants #3979
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
fix missing match arm false positive for enum with no variants #3979
Conversation
|
I think the solution in this PR should work, but enum Never {}
fn test_fn(never: Never) {
match never {}
}I think this is an inference issue related to the match expression coming from a function argument. Any thoughts on this @flodiebold? Places I should start looking? Note that in the IDE I do see |
d33be45 to
19c3c0e
Compare
|
Sorry for the noise here. Converting back to draft because I have not yet covered the reference case (i.e. This seems a bit tricky, since |
The referenced type is a type parameter ( |
19c3c0e to
1e65bc6
Compare
|
I've added a Let me know if there is a more appropriate name for this method. Or if it should go somewhere else. I thought about putting it in an |
1e65bc6 to
360bdf6
Compare
|
bors r+ |
|
Build succeeded: |
fixes #3974