-
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
ICE casting a reference to a static closure as usize, inside array length #52432
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]
} playground: https://play.rust-lang.org/?gist=e21e79c33b6428a56c0bb07df6f0a950&version=nightly&mode=debug&edition=2015 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 |
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
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
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: