diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-10 10:58:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-10 10:58:14 +0100 |
| commit | 1b44889ec2d983d7b7fa7566d4048a57b2f7a1c9 (patch) | |
| tree | bf8ba764da822419d594e00b1c442449e360108f /library/alloc | |
| parent | 094a6204f590e6b4770b5f26359dd17a07897adf (diff) | |
| parent | 1ea6cd715e01f14395ee3f7d944ecc68adf0dde4 (diff) | |
| download | rust-1b44889ec2d983d7b7fa7566d4048a57b2f7a1c9.tar.gz rust-1b44889ec2d983d7b7fa7566d4048a57b2f7a1c9.zip | |
Rollup merge of #112136 - clarfonthey:ffi-c_str, r=cuviper
Add std::ffi::c_str module
ACP: rust-lang/libs-team#134
`std::ffi` docs before change:

`std::ffi` docs after change:

(note: I'm omitting the `c_int`, etc. stuff from the screenshots since it's the same in both. this doesn't just delete those types)
Diffstat (limited to 'library/alloc')
| -rw-r--r-- | library/alloc/src/ffi/c_str.rs | 2 | ||||
| -rw-r--r-- | library/alloc/src/ffi/mod.rs | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/library/alloc/src/ffi/c_str.rs b/library/alloc/src/ffi/c_str.rs index 61ec04a4849..0c7f94ccceb 100644 --- a/library/alloc/src/ffi/c_str.rs +++ b/library/alloc/src/ffi/c_str.rs @@ -1,3 +1,5 @@ +//! [`CString`] and its related types. + #[cfg(test)] mod tests; diff --git a/library/alloc/src/ffi/mod.rs b/library/alloc/src/ffi/mod.rs index e8530fbc1f0..9fc1acc231b 100644 --- a/library/alloc/src/ffi/mod.rs +++ b/library/alloc/src/ffi/mod.rs @@ -80,9 +80,13 @@ #![stable(feature = "alloc_ffi", since = "1.64.0")] +#[doc(no_inline)] #[stable(feature = "alloc_c_string", since = "1.64.0")] -pub use self::c_str::FromVecWithNulError; +pub use self::c_str::{FromVecWithNulError, IntoStringError, NulError}; + +#[doc(inline)] #[stable(feature = "alloc_c_string", since = "1.64.0")] -pub use self::c_str::{CString, IntoStringError, NulError}; +pub use self::c_str::CString; -mod c_str; +#[unstable(feature = "c_str_module", issue = "112134")] +pub mod c_str; |
