Skip to content

Commit 7290ae0

Browse files
committed
refactoring: doc updates and stable v unstable additions
1 parent 8614bd8 commit 7290ae0

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

library/core/src/ffi/mod.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,17 @@ macro_rules! type_alias {
4949
}
5050
}
5151

52-
// Primitives contains listed types.
53-
// Contained in seperate file for simple parsing.
5452
mod primitives;
55-
#[stable(feature = "core_ffi", since = "1.30.0")]
53+
#[unstable(feature = "c_ptrdiff_t", issue = "88345")]
54+
pub use self::primitives::c_ptrdiff_t;
55+
#[unstable(feature = "c_size_t", issue = "88345")]
56+
pub use self::primitives::c_size_t;
57+
#[unstable(feature = "c_ssize_t", issue = "88345")]
58+
pub use self::primitives::c_ssize_t;
59+
#[stable(feature = "core_ffi_c", since = "1.64.0")]
5660
pub use self::primitives::{
57-
c_char, c_double, c_float, c_int, c_long, c_longlong, c_ptrdiff_t, c_schar, c_short, c_size_t,
58-
c_ssize_t, c_uchar, c_uint, c_ulong, c_ulonglong, c_ushort,
61+
c_char, c_double, c_float, c_int, c_long, c_longlong, c_schar, c_short, c_uchar, c_uint,
62+
c_ulong, c_ulonglong, c_ushort,
5963
};
6064

6165
// N.B., for LLVM to recognize the void pointer type and by extension

library/core/src/ffi/primitives.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
//! This module provides primitive types which will
2-
//! match those defined by C, so that code that interacts with C will
3-
//! refer to the correct types.
4-
//!
5-
//! primitives.rs only contains type definitions for consistent external parsing
1+
//! Provides C-compatible primitive types to ensure correct type matching when interfacing with C code.
62
73
type_alias! { "c_char.md", c_char = c_char_definition::c_char; #[doc(cfg(all()))] }
84

src/tools/tidy/src/pal.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ const EXCEPTION_PATHS: &[&str] = &[
5050
"library/core/src/ffi/va_list.rs",
5151
// We placed a linkage against Windows libraries here
5252
"library/core/src/ffi/mod.rs",
53-
// Linkage against Windows libraries here
5453
"library/core/src/ffi/primitives.rs",
5554
"library/std/src/sys", // Platform-specific code for std lives here.
5655
"library/std/src/os", // Platform-specific public interfaces

0 commit comments

Comments
 (0)