Skip to content

Commit

Permalink
docs: inline std::ffi::c_str types to std::ffi
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
notriddle committed Dec 26, 2024
1 parent e2848a0 commit 40b0026
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions library/std/src/ffi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 40b0026

Please sign in to comment.