Skip to content

Commit c1447e3

Browse files
authored
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`
2 parents 5a57d10 + fc8a541 commit c1447e3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

library/core/src/ffi/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
#[doc(inline)]
1313
#[stable(feature = "core_c_str", since = "1.64.0")]
1414
pub use self::c_str::CStr;
15-
#[doc(no_inline)]
15+
#[doc(inline)]
1616
#[stable(feature = "cstr_from_bytes_until_nul", since = "1.69.0")]
1717
pub use self::c_str::FromBytesUntilNulError;
18-
#[doc(no_inline)]
18+
#[doc(inline)]
1919
#[stable(feature = "core_c_str", since = "1.64.0")]
2020
pub use self::c_str::FromBytesWithNulError;
2121
use crate::fmt;

library/std/src/ffi/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -179,19 +179,19 @@ pub use core::ffi::{
179179
c_ulong, c_ulonglong, c_ushort,
180180
};
181181

182-
#[doc(no_inline)]
182+
#[doc(inline)]
183183
#[stable(feature = "cstr_from_bytes_until_nul", since = "1.69.0")]
184184
pub use self::c_str::FromBytesUntilNulError;
185-
#[doc(no_inline)]
185+
#[doc(inline)]
186186
#[stable(feature = "cstr_from_bytes", since = "1.10.0")]
187187
pub use self::c_str::FromBytesWithNulError;
188-
#[doc(no_inline)]
188+
#[doc(inline)]
189189
#[stable(feature = "cstring_from_vec_with_nul", since = "1.58.0")]
190190
pub use self::c_str::FromVecWithNulError;
191-
#[doc(no_inline)]
191+
#[doc(inline)]
192192
#[stable(feature = "cstring_into", since = "1.7.0")]
193193
pub use self::c_str::IntoStringError;
194-
#[doc(no_inline)]
194+
#[doc(inline)]
195195
#[stable(feature = "rust1", since = "1.0.0")]
196196
pub use self::c_str::NulError;
197197
#[doc(inline)]

0 commit comments

Comments
 (0)