Unsized extern statics no longer compile #55239
Labels
A-FFI
Area: Foreign function interface (FFI)
C-bug
Category: This is a bug.
regression-from-stable-to-nightly
Performance or correctness regression from stable to nightly.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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: