-
Notifications
You must be signed in to change notification settings - Fork 13.3k
breaking labeled while-loop in const assignment results in ICE #51350
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
Comments
I can look into this. I should be able to reference the previous PR to help resolve the issue. |
@shssoichiro: the problem here is quite different. The issue is that the
and hence the error to never be reached here:
Really, it feels like this error is happening at too low a level, and it'd be better to match on the expressions at a higher level to report a similar error, rather than doing the analysis on the MIR. |
Still ICE's in both 2015 and 2018 editions. |
As of now, this no longer ICE's. Looking on godbolt, since stable 1.33 this code just compiles. |
See rust-lang#51350 for more information.
Added a test case: #60360 |
…ntril Add test case for labeled break in const assignment Fixes rust-lang#51350.
A while ago, this would cause an illigal instruction, but has been fixed, see #50856 , and no longer is an issue in the current nightly.
Except, using such code while creating a constant, results in an ICE:
https://play.rust-lang.org/?gist=e974c3b625754ce340a4bd77bd3b7235&version=nightly&mode=debug
This is rustc 1.28.0-nightly (5d0631a 2018-05-30).
Backtrace:
The text was updated successfully, but these errors were encountered: