about summary refs log tree commit diff
path: root/src/libsync/atomic.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-10-10 21:59:10 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-10-10 22:09:49 -0700
commitdae48a07f34dcf714b3b57029f4e03a0b95a269e (patch)
tree4ced3fe4c6c167508f0f7d1308473dfec676846d /src/libsync/atomic.rs
parent1add4dedc131d5f98d82feafe80d92ed1f3f6d49 (diff)
Register new snapshots
Also convert a number of `static mut` to just a plain old `static` and remove
some unsafe blocks.
Diffstat (limited to 'src/libsync/atomic.rs')
-rw-r--r--src/libsync/atomic.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libsync/atomic.rs b/src/libsync/atomic.rs
index cd7102a756a..e853e44d6f9 100644
--- a/src/libsync/atomic.rs
+++ b/src/libsync/atomic.rs
@@ -93,12 +93,10 @@
 //! ```
 //! use std::sync::atomic::{AtomicUint, SeqCst, INIT_ATOMIC_UINT};
 //!
-//! static mut GLOBAL_TASK_COUNT: AtomicUint = INIT_ATOMIC_UINT;
+//! static GLOBAL_TASK_COUNT: AtomicUint = INIT_ATOMIC_UINT;
 //!
-//! unsafe {
-//!     let old_task_count = GLOBAL_TASK_COUNT.fetch_add(1, SeqCst);
-//!     println!("live tasks: {}", old_task_count + 1);
-//! }
+//! let old_task_count = GLOBAL_TASK_COUNT.fetch_add(1, SeqCst);
+//! println!("live tasks: {}", old_task_count + 1);
 //! ```
 
 #![allow(deprecated)]