about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-09-28 09:15:29 +0200
committerGitHub <noreply@github.com>2025-09-28 09:15:29 +0200
commit641bedabb1834b47d6e3380b437d889ac3ecd458 (patch)
tree54261f8e79298f9475edef36e1e4a253ddf4326c
parentf22af6485388ef5d627f6782b643bbcadb14d85e (diff)
parent35e582f9828a515c94946eb03910d563d6d38427 (diff)
downloadrust-641bedabb1834b47d6e3380b437d889ac3ecd458.tar.gz
rust-641bedabb1834b47d6e3380b437d889ac3ecd458.zip
Rollup merge of #147095 - fmease:libprivrepr, r=dtolnay
Library: Remove remaining private `#[repr]` workarounds

With https://github.com/rust-lang/rust/pull/116882 finally merged, gating these `repr`s behind cfg `not(doc)` is no longer necessary to achieve a private repr.

Follow up to https://github.com/rust-lang/rust/pull/128046 (that was enabled via https://github.com/rust-lang/rust/pull/115439). With that, https://github.com/rust-lang/rust/pull/116743 is now fully realized at long last.

cc ``@dtolnay``
-rw-r--r--library/core/src/ffi/mod.rs2
-rw-r--r--library/core/src/ffi/va_list.rs8
-rw-r--r--library/core/src/os/darwin/objc.rs4
3 files changed, 7 insertions, 7 deletions
diff --git a/library/core/src/ffi/mod.rs b/library/core/src/ffi/mod.rs
index 0bc98e2ea86..1356ca217c9 100644
--- a/library/core/src/ffi/mod.rs
+++ b/library/core/src/ffi/mod.rs
@@ -56,7 +56,7 @@ pub use self::primitives::{c_ptrdiff_t, c_size_t, c_ssize_t};
 //     be UB.
 #[doc = include_str!("c_void.md")]
 #[lang = "c_void"]
-#[cfg_attr(not(doc), repr(u8))] // An implementation detail we don't want to show up in rustdoc
+#[repr(u8)]
 #[stable(feature = "core_c_void", since = "1.30.0")]
 pub enum c_void {
     #[unstable(
diff --git a/library/core/src/ffi/va_list.rs b/library/core/src/ffi/va_list.rs
index 0d4ccb5aeb2..46ccf330d1c 100644
--- a/library/core/src/ffi/va_list.rs
+++ b/library/core/src/ffi/va_list.rs
@@ -25,7 +25,7 @@ crate::cfg_select! {
         ///
         /// [AArch64 Procedure Call Standard]:
         /// http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055b/IHI0055B_aapcs64.pdf
-        #[cfg_attr(not(doc), repr(C))] // work around https://github.com/rust-lang/rust/issues/66401
+        #[repr(C)]
         #[derive(Debug)]
         #[lang = "va_list"]
         pub struct VaListImpl<'f> {
@@ -39,7 +39,7 @@ crate::cfg_select! {
     }
     all(target_arch = "powerpc", not(target_os = "uefi"), not(windows)) => {
         /// PowerPC ABI implementation of a `va_list`.
-        #[cfg_attr(not(doc), repr(C))] // work around https://github.com/rust-lang/rust/issues/66401
+        #[repr(C)]
         #[derive(Debug)]
         #[lang = "va_list"]
         pub struct VaListImpl<'f> {
@@ -53,7 +53,7 @@ crate::cfg_select! {
     }
     target_arch = "s390x" => {
         /// s390x ABI implementation of a `va_list`.
-        #[cfg_attr(not(doc), repr(C))] // work around https://github.com/rust-lang/rust/issues/66401
+        #[repr(C)]
         #[derive(Debug)]
         #[lang = "va_list"]
         pub struct VaListImpl<'f> {
@@ -66,7 +66,7 @@ crate::cfg_select! {
     }
     all(target_arch = "x86_64", not(target_os = "uefi"), not(windows)) => {
         /// x86_64 ABI implementation of a `va_list`.
-        #[cfg_attr(not(doc), repr(C))] // work around https://github.com/rust-lang/rust/issues/66401
+        #[repr(C)]
         #[derive(Debug)]
         #[lang = "va_list"]
         pub struct VaListImpl<'f> {
diff --git a/library/core/src/os/darwin/objc.rs b/library/core/src/os/darwin/objc.rs
index 928cb54e82c..df3aab867e8 100644
--- a/library/core/src/os/darwin/objc.rs
+++ b/library/core/src/os/darwin/objc.rs
@@ -6,7 +6,7 @@
 use crate::fmt;
 
 /// Equivalent to Objective-C’s `struct objc_class` type.
-#[cfg_attr(not(doc), repr(u8))] // An implementation detail we don't want to show up in rustdoc
+#[repr(u8)]
 pub enum objc_class {
     #[unstable(
         feature = "objc_class_variant",
@@ -31,7 +31,7 @@ impl fmt::Debug for objc_class {
 }
 
 /// Equivalent to Objective-C’s `struct objc_selector` type.
-#[cfg_attr(not(doc), repr(u8))] // An implementation detail we don't want to show up in rustdoc
+#[repr(u8)]
 pub enum objc_selector {
     #[unstable(
         feature = "objc_selector_variant",