Rollup merge of #128046 - GrigorenkoPV:90435, r=tgross35 · model-checking/verify-rust-std@a4c88bc (original) (raw)

7 files changed

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
@@ -428,7 +428,7 @@ impl<'a> ContextBuilder<'a> {
428 428 /// [`Future::poll()`]: core::future::Future::poll
429 429 /// [`Poll::Pending`]: core::task::Poll::Pending
430 430 /// [`Wake`]: ../../alloc/task/trait.Wake.html
431 -#[cfg_attr(not(doc), repr(transparent))] // work around https://github.com/rust-lang/rust/issues/66401
431 +#[repr(transparent)]
432 432 #[stable(feature = "futures_api", since = "1.36.0")]
433 433 pub struct Waker {
434 434 waker: RawWaker,
@@ -692,7 +692,7 @@ impl fmt::Debug for Waker {
692 692 /// [`Poll::Pending`]: core::task::Poll::Pending
693 693 /// [`local_waker`]: core::task::Context::local_waker
694 694 #[unstable(feature = "local_waker", issue = "118959")]
695 -#[cfg_attr(not(doc), repr(transparent))] // work around https://github.com/rust-lang/rust/issues/66401
695 +#[repr(transparent)]
696 696 pub struct LocalWaker {
697 697 waker: RawWaker,
698 698 }
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 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 }