1#![stable(feature = "core_ffi", since = "1.30.0")]
10#![allow(non_camel_case_types)]
11
12#[doc(inline)]
13#[stable(feature = "core_c_str", since = "1.64.0")]
14pub use self::c_str::CStr;
15#[doc(inline)]
16#[stable(feature = "cstr_from_bytes_until_nul", since = "1.69.0")]
17#[cfg(not(feature = "ferrocene_subset"))]
18pub use self::c_str::FromBytesUntilNulError;
19#[doc(inline)]
20#[stable(feature = "core_c_str", since = "1.64.0")]
21#[cfg(not(feature = "ferrocene_subset"))]
22pub use self::c_str::FromBytesWithNulError;
23use crate::fmt;
24
25#[stable(feature = "c_str_module", since = "1.88.0")]
26pub mod c_str;
27
28#[unstable(
29 feature = "c_variadic",
30 issue = "44930",
31 reason = "the `c_variadic` feature has not been properly tested on all supported platforms"
32)]
33#[cfg(not(feature = "ferrocene_subset"))]
34pub use self::va_list::{VaArgSafe, VaList};
35
36#[unstable(
37 feature = "c_variadic",
38 issue = "44930",
39 reason = "the `c_variadic` feature has not been properly tested on all supported platforms"
40)]
41#[cfg(not(feature = "ferrocene_subset"))]
42pub mod va_list;
43
44mod primitives;
45#[stable(feature = "core_ffi_c", since = "1.64.0")]
46pub use self::primitives::{
47 c_char, c_double, c_float, c_int, c_long, c_longlong, c_schar, c_short, c_uchar, c_uint,
48 c_ulong, c_ulonglong, c_ushort,
49};
50#[unstable(feature = "c_size_t", issue = "88345")]
51pub use self::primitives::{c_ptrdiff_t, c_size_t, c_ssize_t};
52
53#[doc = include_str!("c_void.md")]
62#[lang = "c_void"]
63#[repr(u8)]
64#[stable(feature = "core_c_void", since = "1.30.0")]
65pub enum c_void {
66 #[unstable(
67 feature = "c_void_variant",
68 reason = "temporary implementation detail",
69 issue = "none"
70 )]
71 #[doc(hidden)]
72 __variant1,
73 #[unstable(
74 feature = "c_void_variant",
75 reason = "temporary implementation detail",
76 issue = "none"
77 )]
78 #[doc(hidden)]
79 __variant2,
80}
81
82#[stable(feature = "std_debug", since = "1.16.0")]
83impl fmt::Debug for c_void {
84 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
85 f.debug_struct("c_void").finish()
86 }
87}
88
89#[cfg(all(windows, target_env = "msvc"))]
91#[link(
92 name = "/defaultlib:msvcrt",
93 modifiers = "+verbatim",
94 cfg(not(target_feature = "crt-static"))
95)]
96#[link(name = "/defaultlib:libcmt", modifiers = "+verbatim", cfg(target_feature = "crt-static"))]
97unsafe extern "C" {}