Skip to content

Commit

Permalink
[beta]: Remove #[repr(transparent)] from atomics
Browse files Browse the repository at this point in the history
Added in rust-lang#52149 the discussion in rust-lang#53514 is showing how we may not want to
actually add this attribute to the atomic types. While we continue to
debate rust-lang#53514 this commit reverts the addition of the `transparent` attribute
before it hits stable.
  • Loading branch information
alexcrichton committed Sep 5, 2018
1 parent 4dcf42f commit 44fcbe7
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/libcore/sync/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
}
Expand All @@ -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>,
}
Expand Down Expand Up @@ -978,7 +976,6 @@ macro_rules! atomic_int {
///
/// [module-level documentation]: index.html
#[$stable]
#[repr(transparent)]
pub struct $atomic_type {
v: UnsafeCell<$int_type>,
}
Expand Down

0 comments on commit 44fcbe7

Please sign in to comment.