-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Invalid (unstable, ill-formed, ...) const code is evaluated even after emitting error #76064
Comments
Putting this on |
Once this is fixed, we can hopefully also get rid of the |
It does indeed not fix |
I opened a new issue for the |
add error_occured field to ConstQualifs, fix rust-lang#76064 I wasn't sure what `in_return_place` actually did and not sure why it returns `ConstQualifs` while it's sibling functions return `bool`. So I tried to make as minimal changes to the structure as possible. Please point out whether I have to refactor it or not. r? `@oli-obk` cc `@RalfJung`
add error_occured field to ConstQualifs, fix rust-lang#76064 I wasn't sure what `in_return_place` actually did and not sure why it returns `ConstQualifs` while it's sibling functions return `bool`. So I tried to make as minimal changes to the structure as possible. Please point out whether I have to refactor it or not. r? `@oli-obk` cc `@RalfJung`
Nightly-only ICEs are exposed on stable because array lengths are evaluated even when they are invalid:
This first emits an error that a feature flag is missing, but then const-evaluates the array length anyway and later leads to an ICE. This is not a stability hole (there's an error, the code will not compile), but it's an ICE on stable, so it's a bug.
While the ICE should also be fixed, the underlying problem is that we should not const-evaluate code that failed stability checking (and there are possibly other kinds of checks to which this applies as well)
@oli-obk proposed some solutions:
Cc @rust-lang/wg-const-eval
The text was updated successfully, but these errors were encountered: