Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

atomic: remove 'Atomic*' from Debug output #48553

Merged
merged 1 commit into from
Apr 20, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/libcore/sync/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -990,9 +990,7 @@ macro_rules! atomic_int {
#[$stable_debug]
impl fmt::Debug for $atomic_type {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_tuple(stringify!($atomic_type))
.field(&self.load(Ordering::SeqCst))
.finish()
fmt::Debug::fmt(&self.load(Ordering::SeqCst), f)
}
}

Expand Down Expand Up @@ -1866,15 +1864,15 @@ pub fn compiler_fence(order: Ordering) {
#[stable(feature = "atomic_debug", since = "1.3.0")]
impl fmt::Debug for AtomicBool {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_tuple("AtomicBool").field(&self.load(Ordering::SeqCst)).finish()
fmt::Debug::fmt(&self.load(Ordering::SeqCst), f)
}
}

#[cfg(target_has_atomic = "ptr")]
#[stable(feature = "atomic_debug", since = "1.3.0")]
impl<T> fmt::Debug for AtomicPtr<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_tuple("AtomicPtr").field(&self.load(Ordering::SeqCst)).finish()
fmt::Debug::fmt(&self.load(Ordering::SeqCst), f)
}
}

Expand Down