Skip to content

Commit 641beda

Browse files
authored
Rollup merge of rust-lang#147095 - fmease:libprivrepr, r=dtolnay
Library: Remove remaining private `#[repr]` workarounds With rust-lang#116882 finally merged, gating these `repr`s behind cfg `not(doc)` is no longer necessary to achieve a private repr. Follow up to rust-lang#128046 (that was enabled via rust-lang#115439). With that, rust-lang#116743 is now fully realized at long last. cc ``@dtolnay``
2 parents f22af64 + 35e582f commit 641beda

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

library/core/src/ffi/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub use self::primitives::{c_ptrdiff_t, c_size_t, c_ssize_t};
5656
// be UB.
5757
#[doc = include_str!("c_void.md")]
5858
#[lang = "c_void"]
59-
#[cfg_attr(not(doc), repr(u8))] // An implementation detail we don't want to show up in rustdoc
59+
#[repr(u8)]
6060
#[stable(feature = "core_c_void", since = "1.30.0")]
6161
pub enum c_void {
6262
#[unstable(

library/core/src/ffi/va_list.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ crate::cfg_select! {
2525
///
2626
/// [AArch64 Procedure Call Standard]:
2727
/// http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055b/IHI0055B_aapcs64.pdf
28-
#[cfg_attr(not(doc), repr(C))] // work around https://github.com/rust-lang/rust/issues/66401
28+
#[repr(C)]
2929
#[derive(Debug)]
3030
#[lang = "va_list"]
3131
pub struct VaListImpl<'f> {
@@ -39,7 +39,7 @@ crate::cfg_select! {
3939
}
4040
all(target_arch = "powerpc", not(target_os = "uefi"), not(windows)) => {
4141
/// PowerPC ABI implementation of a `va_list`.
42-
#[cfg_attr(not(doc), repr(C))] // work around https://github.com/rust-lang/rust/issues/66401
42+
#[repr(C)]
4343
#[derive(Debug)]
4444
#[lang = "va_list"]
4545
pub struct VaListImpl<'f> {
@@ -53,7 +53,7 @@ crate::cfg_select! {
5353
}
5454
target_arch = "s390x" => {
5555
/// s390x ABI implementation of a `va_list`.
56-
#[cfg_attr(not(doc), repr(C))] // work around https://github.com/rust-lang/rust/issues/66401
56+
#[repr(C)]
5757
#[derive(Debug)]
5858
#[lang = "va_list"]
5959
pub struct VaListImpl<'f> {
@@ -66,7 +66,7 @@ crate::cfg_select! {
6666
}
6767
all(target_arch = "x86_64", not(target_os = "uefi"), not(windows)) => {
6868
/// x86_64 ABI implementation of a `va_list`.
69-
#[cfg_attr(not(doc), repr(C))] // work around https://github.com/rust-lang/rust/issues/66401
69+
#[repr(C)]
7070
#[derive(Debug)]
7171
#[lang = "va_list"]
7272
pub struct VaListImpl<'f> {

library/core/src/os/darwin/objc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use crate::fmt;
77

88
/// Equivalent to Objective-C’s `struct objc_class` type.
9-
#[cfg_attr(not(doc), repr(u8))] // An implementation detail we don't want to show up in rustdoc
9+
#[repr(u8)]
1010
pub enum objc_class {
1111
#[unstable(
1212
feature = "objc_class_variant",
@@ -31,7 +31,7 @@ impl fmt::Debug for objc_class {
3131
}
3232

3333
/// Equivalent to Objective-C’s `struct objc_selector` type.
34-
#[cfg_attr(not(doc), repr(u8))] // An implementation detail we don't want to show up in rustdoc
34+
#[repr(u8)]
3535
pub enum objc_selector {
3636
#[unstable(
3737
feature = "objc_selector_variant",

0 commit comments

Comments
 (0)