Skip to content

Commit cd5dc49

Browse files
authored
Rollup merge of rust-lang#96492 - joshtriplett:revert-std-ffi-re-export, r=yaahc
Revert "Re-export core::ffi types from std::ffi" This reverts commit 9aed829. Fixes rust-lang#96435 , a regression in crates doing `use std::ffi::*;` and `use std::os::raw::*;`. We can re-add this re-export once the `core::ffi` types are stable, and thus the `std::os::raw` types can become re-exports as well, which will avoid the conflict. (Type aliases to the same type still conflict, but re-exports of the same type don't.)
2 parents db1ec25 + 07ea143 commit cd5dc49

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

library/alloc/tests/c_str.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use std::borrow::Cow::{Borrowed, Owned};
2-
use std::ffi::{c_char, CStr};
2+
use std::ffi::CStr;
3+
use std::os::raw::c_char;
34

45
#[test]
56
fn to_str() {

library/std/src/ffi/mod.rs

-9
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,6 @@ pub use self::os_str::{OsStr, OsString};
171171
#[stable(feature = "core_c_void", since = "1.30.0")]
172172
pub use core::ffi::c_void;
173173

174-
#[unstable(feature = "core_ffi_c", issue = "94501")]
175-
pub use core::ffi::{
176-
c_char, c_double, c_float, c_int, c_long, c_longlong, c_schar, c_short, c_uchar, c_uint,
177-
c_ulong, c_ulonglong, c_ushort,
178-
};
179-
180-
#[unstable(feature = "c_size_t", issue = "88345")]
181-
pub use core::ffi::{c_ptrdiff_t, c_size_t, c_ssize_t};
182-
183174
#[unstable(
184175
feature = "c_variadic",
185176
reason = "the `c_variadic` feature has not been properly tested on \

library/std/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@
307307
// Only for re-exporting:
308308
#![feature(assert_matches)]
309309
#![feature(async_iterator)]
310-
#![feature(c_size_t)]
311310
#![feature(c_variadic)]
312311
#![feature(cfg_accessible)]
313312
#![feature(cfg_eval)]

0 commit comments

Comments
 (0)