Provide C FFI types via core::ffi, not just in std
The ability to interoperate with C code via FFI is not limited to crates using std; this allows using these types without std. The existing types in `std::os::raw` become type aliases for the ones in `core::ffi`. This uses type aliases rather than re-exports, to allow the std types to remain stable while the core types are unstable. This also moves the currently unstable `NonZero_` variants and `c_size_t`/`c_ssize_t`/`c_ptrdiff_t` types to `core::ffi`, while leaving them unstable.
This commit is contained in:
parent
0f505c6377
commit
335c9609c6
22 changed files with 189 additions and 166 deletions
|
@ -261,6 +261,7 @@
|
|||
#![feature(const_socketaddr)]
|
||||
#![feature(const_trait_impl)]
|
||||
#![feature(container_error_extra)]
|
||||
#![feature(core_ffi_c)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(core_panic)]
|
||||
#![feature(custom_test_frameworks)]
|
||||
|
@ -315,6 +316,7 @@
|
|||
#![feature(prelude_import)]
|
||||
#![feature(ptr_as_uninit)]
|
||||
#![feature(ptr_internals)]
|
||||
#![feature(raw_os_nonzero)]
|
||||
#![feature(rustc_attrs)]
|
||||
#![feature(rustc_private)]
|
||||
#![feature(saturating_int_impl)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue