]> git.lizzy.rs Git - rust.git/commitdiff
Make examples for AtomicInt refer to AtomicInt
authorPeter Minten <peter@pminten.nl>
Sat, 4 Oct 2014 11:29:09 +0000 (13:29 +0200)
committerPeter Minten <peter@pminten.nl>
Sat, 4 Oct 2014 11:29:09 +0000 (13:29 +0200)
The examples for fetch_or, fetch_and and fetch_xor for
std::sync::atomic::AtomicInt used AtomicUint instead of AtomicInt.

src/libcore/atomic.rs

index e248b934b69c5480a954ef22f3d5830cc6542490..3e53746f58fe9971edb814fa8389d8b53f33da63 100644 (file)
@@ -382,9 +382,9 @@ pub fn fetch_sub(&self, val: int, order: Ordering) -> int {
     /// # Examples
     ///
     /// ```
-    /// use std::sync::atomic::{AtomicUint, SeqCst};
+    /// use std::sync::atomic::{AtomicInt, SeqCst};
     ///
-    /// let foo = AtomicUint::new(0b101101);
+    /// let foo = AtomicInt::new(0b101101);
     /// assert_eq!(0b101101, foo.fetch_and(0b110011, SeqCst));
     /// assert_eq!(0b100001, foo.load(SeqCst));
     #[inline]
@@ -397,9 +397,9 @@ pub fn fetch_and(&self, val: int, order: Ordering) -> int {
     /// # Examples
     ///
     /// ```
-    /// use std::sync::atomic::{AtomicUint, SeqCst};
+    /// use std::sync::atomic::{AtomicInt, SeqCst};
     ///
-    /// let foo = AtomicUint::new(0b101101);
+    /// let foo = AtomicInt::new(0b101101);
     /// assert_eq!(0b101101, foo.fetch_or(0b110011, SeqCst));
     /// assert_eq!(0b111111, foo.load(SeqCst));
     #[inline]
@@ -412,9 +412,9 @@ pub fn fetch_or(&self, val: int, order: Ordering) -> int {
     /// # Examples
     ///
     /// ```
-    /// use std::sync::atomic::{AtomicUint, SeqCst};
+    /// use std::sync::atomic::{AtomicInt, SeqCst};
     ///
-    /// let foo = AtomicUint::new(0b101101);
+    /// let foo = AtomicInt::new(0b101101);
     /// assert_eq!(0b101101, foo.fetch_xor(0b110011, SeqCst));
     /// assert_eq!(0b011110, foo.load(SeqCst));
     #[inline]