-
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
Nightly ICE regression #46769
Comments
Which code had caused this assertion? DetailsCaused by this assertion: rust/src/librustc_trans/type_.rs Lines 289 to 295 in 1b1c792
Which was introduced in #46623, which is beta-nominated. cc @eddyb |
I'm glad I added that assertion! What it likely means is that |
In my case this error is caused by the Backtrace
I'm on Arch running the latest nightly rustc. |
Looks like EDIT: minimal repro: #[repr(packed)]
pub struct Packed(&'static (), usize);
pub fn make() -> Option<(Packed, bool)> { None } |
rustc: ensure optimized enums have a properly aligned size. Fixes #46769 by padding the optimized enums wrapping packed data as necessary. Note that this is not the only way to solve this - on nightly, #46436 makes it easier to fix without adding new padding because of the replacement of `packed` flags with a non-redundant scheme. But because it can't be backported, the optimal fix will be in a separate nightly-only PR (#46809).
rustc: do not raise the alignment of optimized enums to the niche's alignment. This is the improved fix for rust-lang#46769 that does not increase the size of any types (see also rust-lang#46808).
Backtrace
Windows 10 (64-bit)
The text was updated successfully, but these errors were encountered: