about summary refs log tree commit diff
path: root/library/std/src/ffi
diff options
context:
space:
mode:
authorPavel Grigorenko <GrigorenkoPV@ya.ru>2024-07-22 00:59:58 +0300
committerPavel Grigorenko <GrigorenkoPV@ya.ru>2024-07-22 01:10:06 +0300
commitb74f426e074bbaafdd9d15d60c3f57ff4e3f91b9 (patch)
tree71cfd4822c4fb60313c8d3239b8a8cada13f44e5 /library/std/src/ffi
parent92c6c03805408a1a261b98013304e9bbf59ee428 (diff)
Fix some `#[cfg_attr(not(doc), repr(..))]`
Now that #90435 seems to have been resolved.
Diffstat (limited to 'library/std/src/ffi')
-rw-r--r--library/std/src/ffi/os_str.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/library/std/src/ffi/os_str.rs b/library/std/src/ffi/os_str.rs
index f9dba08da4c..0fb3964c9a9 100644
--- a/library/std/src/ffi/os_str.rs
+++ b/library/std/src/ffi/os_str.rs
@@ -115,10 +115,8 @@ impl crate::sealed::Sealed for OsString {}
 #[stable(feature = "rust1", since = "1.0.0")]
 // `OsStr::from_inner` current implementation relies
 // on `OsStr` being layout-compatible with `Slice`.
-// However, `OsStr` layout is considered an implementation detail and must not be relied upon. We
-// want `repr(transparent)` but we don't want it to show up in rustdoc, so we hide it under
-// `cfg(doc)`. This is an ad-hoc implementation of attribute privacy.
-#[cfg_attr(not(doc), repr(transparent))]
+// However, `OsStr` layout is considered an implementation detail and must not be relied upon.
+#[repr(transparent)]
 pub struct OsStr {
     inner: Slice,
 }