-
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: !base.layout().is_sized()
#123078
Comments
regression in #122493 cc @lukas-code |
#122493 makes this easier to trigger, but isn't the root cause. If you change it like this, it also ICEs on beta: use std::mem;
#[repr(C)]
const BAD_ENUM2_OPTION_PTR: Option<Enum2> = unsafe {};
enum UninhDiscriminant {
A,
B(!),
C,
- D(Copy),
+ D(Copy, ()),
}
const BAD_UNINHABITED_VARIANT2: UninhDiscriminant = unsafe { mem::transmute(3u8) };
// # other |
minimized: struct S {
a: [u8],
b: ()
}
const C: S = unsafe { std::mem::transmute(()) }; |
There is a typo in searched nightlies: from nightly-2024-01-01 to nightly-2024-03-15 bisected with cargo-bisect-rustc v0.6.8Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc -vv --preserve --access=github --start=2024-01-01 --end=2024-03-15 --regress=ice |
Not a regression from #121087, just exposed more easily 😆 . struct S {
a: [u8],
b: ()
}
const C: S = unsafe { std::mem::transmute(()) };
const _: [(); {
C;
0
}] = []; has been ICEing much longer |
Damn, we need to go deeper. Judging by Godbolt, the regression is all the way back between 1.25 & 1.26. It bisects to |
lol, that's amazing. thanks! |
This line also seems funny
does it straight up ignore the err guarantee if |
I love this thread <3 haha |
add some more tests Fixes rust-lang#115806 Fixes rust-lang#116710 Fixes rust-lang#123145 Fixes rust-lang#105488 Fixes rust-lang#122488 Fixes rust-lang#123078
Rollup merge of rust-lang#123579 - matthiaskrgr:I_Love_Tests, r=jieyouxu add some more tests Fixes rust-lang#115806 Fixes rust-lang#116710 Fixes rust-lang#123145 Fixes rust-lang#105488 Fixes rust-lang#122488 Fixes rust-lang#123078
auto-reduced (treereduce-rust):
original code
original:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
The text was updated successfully, but these errors were encountered: