Skip to content

Commit dc987ad

Browse files
committed
auto merge of #17766 : pminten/rust/atomic-int-in-examples, r=alexcrichton
The examples for fetch_or, fetch_and and fetch_xor for std::sync::atomic::AtomicInt used AtomicUint instead of AtomicInt.
2 parents 07aeac8 + 2bb7956 commit dc987ad

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/libcore/atomic.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,9 @@ impl AtomicInt {
382382
/// # Examples
383383
///
384384
/// ```
385-
/// use std::sync::atomic::{AtomicUint, SeqCst};
385+
/// use std::sync::atomic::{AtomicInt, SeqCst};
386386
///
387-
/// let foo = AtomicUint::new(0b101101);
387+
/// let foo = AtomicInt::new(0b101101);
388388
/// assert_eq!(0b101101, foo.fetch_and(0b110011, SeqCst));
389389
/// assert_eq!(0b100001, foo.load(SeqCst));
390390
#[inline]
@@ -397,9 +397,9 @@ impl AtomicInt {
397397
/// # Examples
398398
///
399399
/// ```
400-
/// use std::sync::atomic::{AtomicUint, SeqCst};
400+
/// use std::sync::atomic::{AtomicInt, SeqCst};
401401
///
402-
/// let foo = AtomicUint::new(0b101101);
402+
/// let foo = AtomicInt::new(0b101101);
403403
/// assert_eq!(0b101101, foo.fetch_or(0b110011, SeqCst));
404404
/// assert_eq!(0b111111, foo.load(SeqCst));
405405
#[inline]
@@ -412,9 +412,9 @@ impl AtomicInt {
412412
/// # Examples
413413
///
414414
/// ```
415-
/// use std::sync::atomic::{AtomicUint, SeqCst};
415+
/// use std::sync::atomic::{AtomicInt, SeqCst};
416416
///
417-
/// let foo = AtomicUint::new(0b101101);
417+
/// let foo = AtomicInt::new(0b101101);
418418
/// assert_eq!(0b101101, foo.fetch_xor(0b110011, SeqCst));
419419
/// assert_eq!(0b011110, foo.load(SeqCst));
420420
#[inline]

0 commit comments

Comments
 (0)