-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE casting a reference to a static closure as usize, inside array length #52432
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
Labels
A-MIR
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
removing the argument inside the closure gives a different ICE. Interestingly stable refuses to compile this, but beta and nightly ICE's fn main() {
[(); &(static || {}) as *const _ as usize]
} Backtrace:
|
UPDATE: fn main() {
[(); &(static || {}) as *const _ as usize]
} now also ICE's in stable. |
Now no longer ICE's since 1.32. |
The ICE doesn't appear on the latest nightly via the above playground link, marked as E-needstest |
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this issue
Nov 13, 2019
Add some tests for fixed ICEs Closes rust-lang#30904 (fixed between nightly-2019-07-14 and nightly-2019-07-31) Closes rust-lang#40231 (example 1 is fixed in 1.32.0, example 2 is fixed in 1.38.0) Closes rust-lang#52432 (fixed in rustc 1.40.0-beta.1 (76b4053 2019-11-05)) Closes rust-lang#63279 (fixed in rustc 1.40.0-nightly (246be7e 2019-10-25)) r? @Centril
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this issue
Nov 13, 2019
Add some tests for fixed ICEs Closes rust-lang#30904 (fixed between nightly-2019-07-14 and nightly-2019-07-31) Closes rust-lang#40231 (example 1 is fixed in 1.32.0, example 2 is fixed in 1.38.0) Closes rust-lang#52432 (fixed in rustc 1.40.0-beta.1 (76b4053 2019-11-05)) Closes rust-lang#63279 (fixed in rustc 1.40.0-nightly (246be7e 2019-10-25)) r? @Centril
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-MIR
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This issue might be related to #52023 , which has been fixed in #52314
playground link: https://play.rust-lang.org/?gist=b0d76bcfc33acb632a1527d8a9a97c84&version=nightly&mode=debug&edition=2015
Backtrace:
The text was updated successfully, but these errors were encountered: