-
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
Unsized extern statics no longer compile #55239
Comments
I don't see how this is a regression from stable as you need a feature gate to replicate the regression. That said, I do think we should fix this for extern types. Should be doable by using the |
Thanks for the quick feedback and guidance on how to fix! If you don't mind, I'd like to take a stab at fixing this. |
Allow extern statics with an extern type Fixes rust-lang#55239
Allow extern statics with an extern type Fixes rust-lang#55239
Allow extern statics with an extern type Fixes rust-lang#55239
Allow extern statics with an extern type Fixes rust-lang#55239
This is likely due to #55004. Consider the following code:
This code compiles with
rustc 1.31.0-nightly (e7f5d4805 2018-10-18)
, but fails withrustc 1.31.0-nightly (78ff609d7 2018-10-19)
. Error message fromrustc
:I think this code should still be accepted, and I believe #55004 accidentally broke this. One of the purposes of the
extern_types
feature is to better interact with C code like this:I think Rust should accept unsized extern statics that use an extern type (possibly wrapped in a transparent newtype).
cc @oli-obk
The text was updated successfully, but these errors were encountered: