-
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 with anonymous field and a derive in 1.80.1 but also checked on Godbolt's nightly compiler #131041
Labels
C-bug
Category: This is a bug.
F-unnamed_fields
`#![feature(unnamed_fields)]`
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
tialaramex
added
C-bug
Category: This is a bug.
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.
labels
Sep 29, 2024
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Sep 29, 2024
The ICE does not happen if we don't use a derive, or if we give the field a real name |
Closing since this is a duplicate of #121263 (and related to #121299 and #121161) - the feature is currently up for discussion. |
saethlin
removed
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Sep 30, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Oct 11, 2024
…s, r=wesleywiser Retire the `unnamed_fields` feature for now `#![feature(unnamed_fields)]` was implemented in part in rust-lang#115131 and rust-lang#115367, however work on that feature has (afaict) stalled and in the mean time there have been some concerns raised (e.g.[^1][^2]) about whether `unnamed_fields` is worthwhile to have in the language, especially in its current desugaring. Because it represents a compiler implementation burden including a new kind of anonymous ADT and additional complication to field selection, and is quite prone to bugs today, I'm choosing to remove the feature. However, since I'm not one to really write a bunch of words, I'm specifically *not* going to de-RFC this feature. This PR essentially *rolls back* the state of this feature to "RFC accepted but not yet implemented"; however if anyone wants to formally unapprove the RFC from the t-lang side, then please be my guest. I'm just not totally willing to summarize the various language-facing reasons for why this feature is or is not worthwhile, since I'm coming from the compiler side mostly. Fixes rust-lang#117942 Fixes rust-lang#121161 Fixes rust-lang#121263 Fixes rust-lang#121299 Fixes rust-lang#121722 Fixes rust-lang#121799 Fixes rust-lang#126969 Fixes rust-lang#131041 Tracking: * rust-lang#49804 [^1]: https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Unnamed.20struct.2Funion.20fields [^2]: rust-lang#49804 (comment)
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Oct 11, 2024
…s, r=wesleywiser Retire the `unnamed_fields` feature for now `#![feature(unnamed_fields)]` was implemented in part in rust-lang#115131 and rust-lang#115367, however work on that feature has (afaict) stalled and in the mean time there have been some concerns raised (e.g.[^1][^2]) about whether `unnamed_fields` is worthwhile to have in the language, especially in its current desugaring. Because it represents a compiler implementation burden including a new kind of anonymous ADT and additional complication to field selection, and is quite prone to bugs today, I'm choosing to remove the feature. However, since I'm not one to really write a bunch of words, I'm specifically *not* going to de-RFC this feature. This PR essentially *rolls back* the state of this feature to "RFC accepted but not yet implemented"; however if anyone wants to formally unapprove the RFC from the t-lang side, then please be my guest. I'm just not totally willing to summarize the various language-facing reasons for why this feature is or is not worthwhile, since I'm coming from the compiler side mostly. Fixes rust-lang#117942 Fixes rust-lang#121161 Fixes rust-lang#121263 Fixes rust-lang#121299 Fixes rust-lang#121722 Fixes rust-lang#121799 Fixes rust-lang#126969 Fixes rust-lang#131041 Tracking: * rust-lang#49804 [^1]: https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Unnamed.20struct.2Funion.20fields [^2]: rust-lang#49804 (comment)
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Oct 18, 2024
…s, r=wesleywiser Retire the `unnamed_fields` feature for now `#![feature(unnamed_fields)]` was implemented in part in rust-lang#115131 and rust-lang#115367, however work on that feature has (afaict) stalled and in the mean time there have been some concerns raised (e.g.[^1][^2]) about whether `unnamed_fields` is worthwhile to have in the language, especially in its current desugaring. Because it represents a compiler implementation burden including a new kind of anonymous ADT and additional complication to field selection, and is quite prone to bugs today, I'm choosing to remove the feature. However, since I'm not one to really write a bunch of words, I'm specifically *not* going to de-RFC this feature. This PR essentially *rolls back* the state of this feature to "RFC accepted but not yet implemented"; however if anyone wants to formally unapprove the RFC from the t-lang side, then please be my guest. I'm just not totally willing to summarize the various language-facing reasons for why this feature is or is not worthwhile, since I'm coming from the compiler side mostly. Fixes rust-lang#117942 Fixes rust-lang#121161 Fixes rust-lang#121263 Fixes rust-lang#121299 Fixes rust-lang#121722 Fixes rust-lang#121799 Fixes rust-lang#126969 Fixes rust-lang#131041 Tracking: * rust-lang#49804 [^1]: https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Unnamed.20struct.2Funion.20fields [^2]: rust-lang#49804 (comment)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
F-unnamed_fields
`#![feature(unnamed_fields)]`
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.
Code
Meta
rustc --version --verbose
:Error output
thread 'rustc' panicked at compiler/rustc_hir_analysis/src/collect.rs:892:49:
expect Adt for unnamed field
Backtrace
``` 0: 0x7f8f73f4f135 - ::fmt::h2a0cac5be5a8d820 1: 0x7f8f73f9dafb - core::fmt::write::h17332d03f2f4f35b 2: 0x7f8f73f4421f - 3: 0x7f8f73f4ef0e - 4: 0x7f8f73f51949 - 5: 0x7f8f73f516ea - std::panicking::default_hook::ha48f87b295834c46 6: 0x7f8f74a5ec30 - 7: 0x7f8f73f5200b - std::panicking::rust_panic_with_hook::h4eeb081fd329f3e2 8: 0x7f8f73f51d84 - 9: 0x7f8f73f4f5f9 - 10: 0x7f8f73f51ab7 - rust_begin_unwind 11: 0x7f8f73f15a73 - core::panicking::panic_fmt::h755ac17b0b090cd9 12: 0x7f8f73f15a3b - core::option::expect_failed::h27ffe2fb3bb55e8c 13: 0x7f8f75f9d6c0 - rustc_hir_analysis[9a5fae5dc28e0e53]::collect::find_field 14: 0x7f8f7710649f - 15: 0x7f8f771058b1 - 16: 0x7f8f754fc093 - 17: 0x7f8f7546323e - 18: 0x7f8f7544390f - 19: 0x7f8f7559f041 - 20: 0x7f8f760a1e57 - 21: 0x7f8f760603dc - 22: 0x7f8f7605d32d - 23: 0x7f8f7605fbc3 - 24: 0x7f8f7605d32d - 25: 0x7f8f7605fbc3 - 26: 0x7f8f760460fa - 27: 0x7f8f7605f589 - 28: 0x7f8f7605d32d - 29: 0x7f8f760d7b02 - 30: 0x7f8f7605d32d - 31: 0x7f8f7612c352 - 32: 0x7f8f76124081 - rustc_hir_typeck[30ee169b06768cb7]::typeck 33: 0x7f8f768b6ad7 - 34: 0x7f8f75462850 - 35: 0x7f8f75450f11 - 36: 0x7f8f7556d828 - 37: 0x7f8f75fa8e3a - rustc_hir_analysis[9a5fae5dc28e0e53]::check_crate 38: 0x7f8f76231b9e - rustc_interface[881e2d08a402e036]::passes::analysis 39: 0x7f8f771081e7 - 40: 0x7f8f75461a4f - 41: 0x7f8f75417c08 - 42: 0x7f8f7555d394 - 43: 0x7f8f76e65fdc - 44: 0x7f8f76e63de7 - 45: 0x7f8f76e68a7a - 46: 0x7f8f73f5bfeb - 47: 0x7f8f73d796d7 - start_thread 48: 0x7f8f73dfd60c - __clone3 49: 0x0 - ```
The text was updated successfully, but these errors were encountered: