-
Notifications
You must be signed in to change notification settings - Fork 13.4k
ICE: enum discriminant depends on generic arguments #64662
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
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
Uh oh!
There was an error while loading. Please reload this page.
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: