New #[rustc_pub_transparent]
attribute · patricklam/verify-rust-std@f965950 (original) (raw)
4 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -306,6 +306,7 @@ pub use once::OnceCell; | ||
306 | 306 | /// See the [module-level documentation](self) for more. |
307 | 307 | #[stable(feature = "rust1", since = "1.0.0")] |
308 | 308 | #[repr(transparent)] |
309 | +#[cfg_attr(not(bootstrap), rustc_pub_transparent)] | |
309 | 310 | pub struct Cell<T: ?Sized> { |
310 | 311 | value: UnsafeCell<T>, |
311 | 312 | } |
@@ -2055,6 +2056,7 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> { | ||
2055 | 2056 | #[lang = "unsafe_cell"] |
2056 | 2057 | #[stable(feature = "rust1", since = "1.0.0")] |
2057 | 2058 | #[repr(transparent)] |
2059 | +#[cfg_attr(not(bootstrap), rustc_pub_transparent)] | |
2058 | 2060 | pub struct UnsafeCell<T: ?Sized> { |
2059 | 2061 | value: T, |
2060 | 2062 | } |
@@ -2297,6 +2299,7 @@ impl UnsafeCell<*mut T> { | ||
2297 | 2299 | /// See [`UnsafeCell`] for details. |
2298 | 2300 | #[unstable(feature = "sync_unsafe_cell", issue = "95439")] |
2299 | 2301 | #[repr(transparent)] |
2302 | +#[cfg_attr(not(bootstrap), rustc_pub_transparent)] | |
2300 | 2303 | pub struct SyncUnsafeCell<T: ?Sized> { |
2301 | 2304 | value: UnsafeCell<T>, |
2302 | 2305 | } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -47,6 +47,7 @@ use crate::ptr; | ||
47 | 47 | #[lang = "manually_drop"] |
48 | 48 | #[derive(Copy, Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] |
49 | 49 | #[repr(transparent)] |
50 | +#[cfg_attr(not(bootstrap), rustc_pub_transparent)] | |
50 | 51 | pub struct ManuallyDrop<T: ?Sized> { |
51 | 52 | value: T, |
52 | 53 | } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -237,6 +237,7 @@ use crate::{fmt, intrinsics, ptr, slice}; | ||
237 | 237 | #[lang = "maybe_uninit"] |
238 | 238 | #[derive(Copy)] |
239 | 239 | #[repr(transparent)] |
240 | +#[cfg_attr(not(bootstrap), rustc_pub_transparent)] | |
240 | 241 | pub union MaybeUninit<T> { |
241 | 242 | uninit: (), |
242 | 243 | value: ManuallyDrop<T>, |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1084,6 +1084,7 @@ use crate::{cmp, fmt}; | ||
1084 | 1084 | #[lang = "pin"] |
1085 | 1085 | #[fundamental] |
1086 | 1086 | #[repr(transparent)] |
1087 | +#[cfg_attr(not(bootstrap), rustc_pub_transparent)] | |
1087 | 1088 | #[derive(Copy, Clone)] |
1088 | 1089 | pub struct Pin<Ptr> { |
1089 | 1090 | // FIXME(#93176): this field is made `#[unstable] #[doc(hidden)] pub` to: |