-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 when creating a static with an extern type field #55541
Comments
cc @RalfJung |
Wasn't the conclusion from the |
I would expect and hope that Rust permits |
So what exactly are the current rules for fields of dynamically unsized types? Every other field being zero-sized is likely not enough, but if it also has alignment 1 then I can see how that works. I'd just like to know what the rules are so we can implement them in miri. Cc @plietar |
miri: accept extern types in structs if they are the only field Fixes rust-lang#55541 Cc @oli-obk @eddyb rust-lang#43467
miri: accept extern types in structs if they are the only field Fixes rust-lang#55541 Cc @oli-obk @eddyb rust-lang#43467
miri: accept extern types in structs if they are the only field Fixes rust-lang#55541 Cc @oli-obk @eddyb rust-lang#43467
miri: accept extern types in structs if they are the only field Fixes rust-lang#55541 Cc @oli-obk @eddyb rust-lang#43467
The following code used to work, but no longer does on the latest nightly:
It causes an ICE when attempting to compile it.
Backtrace:
The problem appears to be the
Wrapper
type. If you modifyMAGIC_FFI_REF
to have the type&'static ExternType
then it compiles okay. It only fails with the type&'static Wrapper
.My rust version:
rustc 1.31.0-nightly (1cf82fd9c 2018-10-30)
.The text was updated successfully, but these errors were encountered: