-
Notifications
You must be signed in to change notification settings - Fork 13.3k
assertion failure in trans_alt when combining if, nested patterns #3121
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
This looks very similar to #2869 |
I have a fix for this; running tests. Basically, |
Oops, it's not as simple as that. Still working on it. |
Bumping this since it can always be worked around. Should fix but non blocking. |
Not critical for 0.6; de-milestoning |
Nominating for milestone 5, production-ready. I have an old branch that partially fixes it, but it needs more work. |
reproduced, and people run into it often, sure |
accepted for production-ready milestone |
Is this fixed in 0.7? I think I've run into it recently. Is there a workaround? |
@jasom: combine the caes with the same patterns, moving their |
There were several open issues that were all manifestations of the same bug in trans::alt. The fix is for enter_default to avoid treating any pattern with a guard as a default. I judged this change too minor for code review, but someone tell me if I'm wrong :-) Closes rust-lang#3121
I think I have a pretty good idea of how to fix this, although it seems a little subtle/hacky. |
Automatic sync from rustc
The following test:
results in an assertion failure in trans:
The problem has to do with the
if
, something in the logic there gets a bit confused.The text was updated successfully, but these errors were encountered: