diff options
| author | bors <bors@rust-lang.org> | 2016-11-09 05:35:23 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-09 05:35:23 -0800 |
| commit | 02aa42860d6e74dfa57824f79bdc9c57665d6af0 (patch) | |
| tree | 395b309b58ae7057a59ef8d85cb5eb253386975a /src/liballoc | |
| parent | 966c70085adc69eecf9c8cd1f128872e8d90614d (diff) | |
| parent | 5c92c2c6a9450d087b0977b89318688fe1bbd2a0 (diff) | |
| download | rust-02aa42860d6e74dfa57824f79bdc9c57665d6af0.tar.gz rust-02aa42860d6e74dfa57824f79bdc9c57665d6af0.zip | |
Auto merge of #37657 - steveklabnik:rollup, r=steveklabnik
Rollup of 8 pull requests - Successful merges: #35102, #37425, #37483, #37588, #37601, #37610, #37650, #37652 - Failed merges:
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/arc.rs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index 85dd2e9a4a5..3a7da18c8de 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -381,11 +381,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 /// /// ``` @@ -409,8 +412,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 /// |
