File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -319,11 +319,14 @@ impl<T: ?Sized> Arc<T> {
319319
320320 /// Gets the number of [`Weak`][weak] pointers to this value.
321321 ///
322- /// Be careful how you use this information, because another thread
323- /// may change the weak count at any time.
324- ///
325322 /// [weak]: struct.Weak.html
326323 ///
324+ /// # Safety
325+ ///
326+ /// This method by itself is safe, but using it correctly requires extra care.
327+ /// Another thread can change the weak count at any time,
328+ /// including potentially between calling this method and acting on the result.
329+ ///
327330 /// # Examples
328331 ///
329332 /// ```
@@ -347,8 +350,11 @@ impl<T: ?Sized> Arc<T> {
347350
348351 /// Gets the number of strong (`Arc`) pointers to this value.
349352 ///
350- /// Be careful how you use this information, because another thread
351- /// may change the strong count at any time.
353+ /// # Safety
354+ ///
355+ /// This method by itself is safe, but using it correctly requires extra care.
356+ /// Another thread can change the strong count at any time,
357+ /// including potentially between calling this method and acting on the result.
352358 ///
353359 /// # Examples
354360 ///
You can’t perform that action at this time.
0 commit comments