Skip to content

Commit 309e21c

Browse files
committed
Auto merge of #53978 - alexcrichton:remove-repr-transparent-atomics, r=nikomatsakis
[beta]: Remove `#[repr(transparent)]` from atomics Added in #52149 the discussion in #53514 is showing how we may not want to actually add this attribute to the atomic types. While we continue to debate #53514 this commit reverts the addition of the `transparent` attribute before it hits stable.
2 parents 4dcf42f + 44fcbe7 commit 309e21c

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/libcore/sync/atomic.rs

-3
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ pub fn spin_loop_hint() {
124124
/// [`bool`]: ../../../std/primitive.bool.html
125125
#[cfg(target_has_atomic = "8")]
126126
#[stable(feature = "rust1", since = "1.0.0")]
127-
#[repr(transparent)]
128127
pub struct AtomicBool {
129128
v: UnsafeCell<u8>,
130129
}
@@ -148,7 +147,6 @@ unsafe impl Sync for AtomicBool {}
148147
/// This type has the same in-memory representation as a `*mut T`.
149148
#[cfg(target_has_atomic = "ptr")]
150149
#[stable(feature = "rust1", since = "1.0.0")]
151-
#[repr(transparent)]
152150
pub struct AtomicPtr<T> {
153151
p: UnsafeCell<*mut T>,
154152
}
@@ -978,7 +976,6 @@ macro_rules! atomic_int {
978976
///
979977
/// [module-level documentation]: index.html
980978
#[$stable]
981-
#[repr(transparent)]
982979
pub struct $atomic_type {
983980
v: UnsafeCell<$int_type>,
984981
}

0 commit comments

Comments
 (0)