-
Notifications
You must be signed in to change notification settings - Fork 13.3k
#[derive(Debug)] on #[repr(packed)] enum causes internal compiler error #133025
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
error[E0517]: attribute should be applied to a struct or union
--> src/main.rs:2:8
|
2 | #[repr(packed)]
| ^^^^^^
3 | / enum COption<T> {
4 | | None,
5 | | Some(T),
6 | | }
| |_- not a struct or union
For more information about this error, try `rustc --explain E0517`.
|
This appears to have regressed in 1.78.0 on stable (1.77.0 does not ICE), or bisectionBisection determined this regressed in Bisected with searched toolchains nightly-2024-02-01 through nightly-2024-03-16
********************************************************************************
Regression in nightly-2024-02-09
********************************************************************************
fetching https://static.rust-lang.org/dist/2024-02-08/channel-rust-nightly-git-commit-hash.txt
nightly manifest 2024-02-08: 40 B / 40 B [=====================================================================] 100.00 % 846.46 KB/s converted 2024-02-08 to 8ace7ea1f7cbba7b4f031e66c54ca237a0d65de6
fetching https://static.rust-lang.org/dist/2024-02-09/channel-rust-nightly-git-commit-hash.txt
nightly manifest 2024-02-09: 40 B / 40 B [=====================================================================] 100.00 % 521.58 KB/s converted 2024-02-09 to 98aa3624be70462d6a25ed5544333e3df62f4c66
looking for regression commit between 2024-02-08 and 2024-02-09
fetching (via remote github) commits from max(8ace7ea1f7cbba7b4f031e66c54ca237a0d65de6, 2024-02-06) to 98aa3624be70462d6a25ed5544333e3df62f4c66
ending github query because we found starting sha: 8ace7ea1f7cbba7b4f031e66c54ca237a0d65de6
get_commits_between returning commits, len: 9
commit[0] 2024-02-07: Auto merge of #120748 - Nadrieril:rollup-dj0qwv5, r=Nadrieril
commit[1] 2024-02-08: Auto merge of #120381 - fee1-dead-contrib:reconstify-add, r=compiler-errors
commit[2] 2024-02-08: Auto merge of #120521 - reitermarkus:generic-nonzero-constructors, r=dtolnay
commit[3] 2024-02-08: Auto merge of #120558 - oli-obk:missing_impl_item_ice, r=estebank
commit[4] 2024-02-08: Auto merge of #120579 - GuillaumeGomez:prevent-running-unneeded-code, r=notriddle
commit[5] 2024-02-08: Auto merge of #120550 - oli-obk:track_errors8, r=estebank
commit[6] 2024-02-08: Auto merge of #120767 - matthiaskrgr:rollup-0k8ib1c, r=matthiaskrgr
commit[7] 2024-02-08: Auto merge of #120544 - BoxyUwU:enter_forall, r=lcnr
commit[8] 2024-02-08: Auto merge of #120807 - matthiaskrgr:rollup-1pf3glu, r=matthiaskrgr
ERROR: no CI builds available between 8ace7ea1f7cbba7b4f031e66c54ca237a0d65de6 and 98aa3624be70462d6a25ed5544333e3df62f4c66 within last 167 days |
Duplicate of #120873 I think |
don't think so |
What difference do you see? #[derive(Debug)]
#[repr(packed)]
enum COption<T> {
None,
Some(T),
}
fn main() {
} is identical to #120873 (comment) #[repr(packed)]
struct Dealigned<T>(u8, T);
#[derive(PartialEq)]
#[repr(C)]
struct Dealigned<T>(u8, T); |
Yes, it's the exact same check firing. But I think the check is firing for entirely different reasons. It could be the same but I'd be surprised. It's nice to have the links between the two issues because they are similar but I certainly wouldn't close this. |
Introduced by eab2adb. |
Both this and #120873 bisect same way to nightly-2024-02-09 Either way, |
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: