about summary refs log tree commit diff
path: root/src/libsync/atomic.rs
diff options
context:
space:
mode:
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)]