-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Unsized extern statics no longer compile #55239
Copy link
Copy link
Closed
Labels
A-FFIArea: Foreign function interface (FFI)Area: Foreign function interface (FFI)C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Metadata
Metadata
Assignees
Labels
A-FFIArea: Foreign function interface (FFI)Area: Foreign function interface (FFI)C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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_typesfeature 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