File tree 7 files changed +11
-15
lines changed
7 files changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -506,7 +506,7 @@ where
506
506
/// ```
507
507
///
508
508
#[unstable(feature = "error_generic_member_access", issue = "99301")]
509
- #[cfg_attr(not(doc), repr(transparent))] // work around https://github.com./rust-lang/rust/issues/90435
509
+ #[repr(transparent)]
510
510
pub struct Request<'a>(Tagged<dyn Erased<'a> + 'a>);
511
511
512
512
impl<'a> Request<'a> {
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ use crate::str;
103
103
// However, `CStr` layout is considered an implementation detail and must not be relied upon. We
104
104
// want `repr(transparent)` but we don't want it to show up in rustdoc, so we hide it under
105
105
// `cfg(doc)`. This is an ad-hoc implementation of attribute privacy.
106
- #[cfg_attr(not(doc), repr(transparent) )]
106
+ #[repr(transparent)]
107
107
#[allow(clippy::derived_hash_with_manual_eq)]
108
108
pub struct CStr {
109
109
// FIXME: this should not be represented with a DST slice but rather with
Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ mod c_long_definition {
191
191
// be UB.
192
192
#[doc = include_str!("c_void.md")]
193
193
#[lang = "c_void"]
194
- #[cfg_attr(not(doc), repr(u8))] // work around https://github.com./rust-lang/rust/issues/90435
194
+ #[cfg_attr(not(doc), repr(u8))] // An implementation detail we don't want to show up in rustdoc
195
195
#[stable(feature = "core_c_void", since = "1.30.0")]
196
196
pub enum c_void {
197
197
#[unstable(
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ use crate::ops::{Deref, DerefMut};
23
23
target_os = "uefi",
24
24
windows,
25
25
))]
26
- #[cfg_attr(not(doc), repr(transparent))] // work around https://github.com./rust-lang/rust/issues/90435
26
+ #[repr(transparent)]
27
27
#[lang = "va_list"]
28
28
pub struct VaListImpl<'f> {
29
29
ptr: *mut c_void,
@@ -115,7 +115,7 @@ pub struct VaListImpl<'f> {
115
115
}
116
116
117
117
/// A wrapper for a `va_list`
118
- #[cfg_attr(not(doc), repr(transparent))] // work around https://github.com./rust-lang/rust/issues/90435
118
+ #[repr(transparent)]
119
119
#[derive(Debug)]
120
120
pub struct VaList<'a, 'f: 'a> {
121
121
#[cfg(any(
Original file line number Diff line number Diff line change @@ -429,7 +429,7 @@ impl<'a> ContextBuilder<'a> {
429
429
/// [`Future::poll()`]: core::future::Future::poll
430
430
/// [`Poll::Pending`]: core::task::Poll::Pending
431
431
/// [`Wake`]: ../../alloc/task/trait.Wake.html
432
- #[cfg_attr(not(doc), repr(transparent))] // work around https://github.com./rust-lang/rust/issues/66401
432
+ #[repr(transparent)]
433
433
#[stable(feature = "futures_api", since = "1.36.0")]
434
434
pub struct Waker {
435
435
waker: RawWaker,
@@ -695,7 +695,7 @@ impl fmt::Debug for Waker {
695
695
/// [`Poll::Pending`]: core::task::Poll::Pending
696
696
/// [`local_waker`]: core::task::Context::local_waker
697
697
#[unstable(feature = "local_waker", issue = "118959")]
698
- #[cfg_attr(not(doc), repr(transparent))] // work around https://github.com./rust-lang/rust/issues/66401
698
+ #[repr(transparent)]
699
699
pub struct LocalWaker {
700
700
waker: RawWaker,
701
701
}
Original file line number Diff line number Diff line change @@ -115,10 +115,8 @@ impl crate::sealed::Sealed for OsString {}
115
115
#[stable(feature = "rust1", since = "1.0.0")]
116
116
// `OsStr::from_inner` current implementation relies
117
117
// on `OsStr` being layout-compatible with `Slice`.
118
- // However, `OsStr` layout is considered an implementation detail and must not be relied upon. We
119
- // want `repr(transparent)` but we don't want it to show up in rustdoc, so we hide it under
120
- // `cfg(doc)`. This is an ad-hoc implementation of attribute privacy.
121
- #[cfg_attr(not(doc), repr(transparent))]
118
+ // However, `OsStr` layout is considered an implementation detail and must not be relied upon.
119
+ #[repr(transparent)]
122
120
pub struct OsStr {
123
121
inner: Slice,
124
122
}
Original file line number Diff line number Diff line change @@ -2079,10 +2079,8 @@ impl AsRef<OsStr> for PathBuf {
2079
2079
#[stable(feature = "rust1", since = "1.0.0")]
2080
2080
// `Path::new` current implementation relies
2081
2081
// on `Path` being layout-compatible with `OsStr`.
2082
- // However, `Path` layout is considered an implementation detail and must not be relied upon. We
2083
- // want `repr(transparent)` but we don't want it to show up in rustdoc, so we hide it under
2084
- // `cfg(doc)`. This is an ad-hoc implementation of attribute privacy.
2085
- #[cfg_attr(not(doc), repr(transparent))]
2082
+ // However, `Path` layout is considered an implementation detail and must not be relied upon.
2083
+ #[repr(transparent)]
2086
2084
pub struct Path {
2087
2085
inner: OsStr,
2088
2086
}
You can’t perform that action at this time.
0 commit comments