about summary refs log tree commit diff
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-09-07 13:47:23 +0800
committerkennytm <kennytm@gmail.com>2018-09-07 18:13:57 +0800
commit9b70ef7780ee3afdf68700b64327353babae9310 (patch)
tree01bd7f4b4f659adafe35f09c9811627c66cb1b8a
parent1681b154ee3e88e57c571895ad1eb7d8e1ebe0d8 (diff)
parent0338d340c4ad64dde20dfa5ab8b983861e58c631 (diff)
downloadrust-9b70ef7780ee3afdf68700b64327353babae9310.tar.gz
rust-9b70ef7780ee3afdf68700b64327353babae9310.zip
Rollup merge of #53979 - alexcrichton:remove-repr-transparent-atomics-master, r=sfackler
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.
This should be a more conservative route which leaves us the ability to tweak
this in the future but in the meantime allows us to continue discussion as well.
-rw-r--r--src/libcore/sync/atomic.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs
index 617e067e078..602f8d4ee71 100644
--- a/src/libcore/sync/atomic.rs
+++ b/src/libcore/sync/atomic.rs
@@ -124,7 +124,6 @@ pub fn spin_loop_hint() {
 /// [`bool`]: ../../../std/primitive.bool.html
 #[cfg(target_has_atomic = "8")]
 #[stable(feature = "rust1", since = "1.0.0")]
-#[repr(transparent)]
 pub struct AtomicBool {
     v: UnsafeCell<u8>,
 }
@@ -148,7 +147,6 @@ unsafe impl Sync for AtomicBool {}
 /// This type has the same in-memory representation as a `*mut T`.
 #[cfg(target_has_atomic = "ptr")]
 #[stable(feature = "rust1", since = "1.0.0")]
-#[repr(transparent)]
 pub struct AtomicPtr<T> {
     p: UnsafeCell<*mut T>,
 }
@@ -1101,7 +1099,6 @@ macro_rules! atomic_int {
         ///
         /// [module-level documentation]: index.html
         #[$stable]
-        #[repr(transparent)]
         pub struct $atomic_type {
             v: UnsafeCell<$int_type>,
         }