diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2024-12-26 21:56:51 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-26 21:56:51 -0500 |
| commit | c1447e34495fd72dc8d70cb7deea50c457686f69 (patch) | |
| tree | ed01c67c5cb97757acf928a81383043c23beb082 | |
| parent | 5a57d10589a1f995316b5bed3afd89a7a71deb8c (diff) | |
| parent | fc8a541eaa4b6555d948c382b75677b0e17040fa (diff) | |
| download | rust-c1447e34495fd72dc8d70cb7deea50c457686f69.tar.gz rust-c1447e34495fd72dc8d70cb7deea50c457686f69.zip | |
Rollup merge of #134791 - notriddle:notriddle/inline-ffi-error-types, r=tgross35
docs: inline `std::ffi::c_str` types to `std::ffi` Rustdoc has no way to show that an item is stable, but only at a different path. `std::ffi::c_str::NulError` is not stable, but `std::ffi::NulError` is. To avoid marking these types as unstable when someone just wants to follow a link from `CString`, inline them into their stable paths. Fixes #134702 r? `@tgross35`
| -rw-r--r-- | library/core/src/ffi/mod.rs | 4 | ||||
| -rw-r--r-- | library/std/src/ffi/mod.rs | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/library/core/src/ffi/mod.rs b/library/core/src/ffi/mod.rs index 7a161f595f4..5f32775822b 100644 --- a/library/core/src/ffi/mod.rs +++ b/library/core/src/ffi/mod.rs @@ -12,10 +12,10 @@ #[doc(inline)] #[stable(feature = "core_c_str", since = "1.64.0")] pub use self::c_str::CStr; -#[doc(no_inline)] +#[doc(inline)] #[stable(feature = "cstr_from_bytes_until_nul", since = "1.69.0")] pub use self::c_str::FromBytesUntilNulError; -#[doc(no_inline)] +#[doc(inline)] #[stable(feature = "core_c_str", since = "1.64.0")] pub use self::c_str::FromBytesWithNulError; use crate::fmt; diff --git a/library/std/src/ffi/mod.rs b/library/std/src/ffi/mod.rs index 469136be883..7d7cce09a3f 100644 --- a/library/std/src/ffi/mod.rs +++ b/library/std/src/ffi/mod.rs @@ -179,19 +179,19 @@ pub use core::ffi::{ c_ulong, c_ulonglong, c_ushort, }; -#[doc(no_inline)] +#[doc(inline)] #[stable(feature = "cstr_from_bytes_until_nul", since = "1.69.0")] pub use self::c_str::FromBytesUntilNulError; -#[doc(no_inline)] +#[doc(inline)] #[stable(feature = "cstr_from_bytes", since = "1.10.0")] pub use self::c_str::FromBytesWithNulError; -#[doc(no_inline)] +#[doc(inline)] #[stable(feature = "cstring_from_vec_with_nul", since = "1.58.0")] pub use self::c_str::FromVecWithNulError; -#[doc(no_inline)] +#[doc(inline)] #[stable(feature = "cstring_into", since = "1.7.0")] pub use self::c_str::IntoStringError; -#[doc(no_inline)] +#[doc(inline)] #[stable(feature = "rust1", since = "1.0.0")] pub use self::c_str::NulError; #[doc(inline)] |
