Skip to content

Commit

Permalink
Rollup merge of rust-lang#37652 - SimonSapin:arc-count-doc, r=alexcri…
Browse files Browse the repository at this point in the history
…chton

More proeminent warning in Arc::{strong,weak}_count docs.

CC rust-lang#28356 (comment)
  • Loading branch information
steveklabnik authored Nov 8, 2016
2 parents 48c4d17 + 9357153 commit 5c92c2c
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/liballoc/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,14 @@ impl<T: ?Sized> Arc<T> {

/// Gets the number of [`Weak`][weak] pointers to this value.
///
/// Be careful how you use this information, because another thread
/// may change the weak count at any time.
///
/// [weak]: struct.Weak.html
///
/// # Safety
///
/// This method by itself is safe, but using it correctly requires extra care.
/// Another thread can change the weak count at any time,
/// including potentially between calling this method and acting on the result.
///
/// # Examples
///
/// ```
Expand All @@ -347,8 +350,11 @@ impl<T: ?Sized> Arc<T> {

/// Gets the number of strong (`Arc`) pointers to this value.
///
/// Be careful how you use this information, because another thread
/// may change the strong count at any time.
/// # Safety
///
/// This method by itself is safe, but using it correctly requires extra care.
/// Another thread can change the strong count at any time,
/// including potentially between calling this method and acting on the result.
///
/// # Examples
///
Expand Down

0 comments on commit 5c92c2c

Please sign in to comment.