Rollup merge of #37652 - SimonSapin:arc-count-doc, r=alexcrichton

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

CC https://github.com/rust-lang/rust/issues/28356#issuecomment-259212258
This commit is contained in:
Steve Klabnik 2016-11-08 16:20:58 -05:00 committed by GitHub
commit 5c92c2c6a9

View File

@ -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
///
/// ```
@ -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
///