-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
ICE: enum discriminant depends on generic arguments #64662
Comments
Backtrace:
|
This is because the discriminant assignment code tries to increment the discriminant of the previous variant, which was an error, and thus fails in a different way to the first. However, the code looks like it handles that case, so I'm not yet sure what's going wrong here. Edit: I think there's some state changing inside |
It's not a regression. Stable shows
I don't see how we could be keeping state. Maybe it's happening because there's no "cannot infer type for |
Hmm, perhaps. In that case, it's simplest just to |
This no longer ICEs on nightly, though it does ICE on beta. We now get type inference errors on both variants. |
Reopening, as we should have a test. |
Add test for issue-64662 Closes rust-lang#64662 r? @varkor
Following code ICEs on today's nightly (97e58c0 2019-09-20):
What's peculiar is that no ICE is shown when the
Foo
enum contains only one item:The text was updated successfully, but these errors were encountered: