@@ -1485,8 +1485,9 @@ impl<T> Weak<T> {
1485
1485
1486
1486
/// Consumes the `Weak<T>` and turns it into a raw pointer.
1487
1487
///
1488
- /// This converts the weak pointer into a raw pointer, preserving the original weak count. It
1489
- /// can be turned back into the `Weak<T>` with [`from_raw`].
1488
+ /// This converts the weak pointer into a raw pointer, while still preserving the ownership of
1489
+ /// one weak reference (the weak count is not modified by this operation). It can be turned
1490
+ /// back into the `Weak<T>` with [`from_raw`].
1490
1491
///
1491
1492
/// The same restrictions of accessing the target of the pointer as with
1492
1493
/// [`as_ptr`] apply.
@@ -1516,24 +1517,23 @@ impl<T> Weak<T> {
1516
1517
result
1517
1518
}
1518
1519
1519
- /// Converts a raw pointer previously created by [`into_raw`] back into
1520
- /// `Weak<T>`.
1520
+ /// Converts a raw pointer previously created by [`into_raw`] back into `Weak<T>`.
1521
1521
///
1522
1522
/// This can be used to safely get a strong reference (by calling [`upgrade`]
1523
1523
/// later) or to deallocate the weak count by dropping the `Weak<T>`.
1524
1524
///
1525
- /// It takes ownership of one weak count (with the exception of pointers created by [`new`],
1526
- /// as these don't have any corresponding weak count ).
1525
+ /// It takes ownership of one weak reference (with the exception of pointers created by [`new`],
1526
+ /// as these don't own anything; the method still works on them ).
1527
1527
///
1528
1528
/// # Safety
1529
1529
///
1530
1530
/// The pointer must have originated from the [`into_raw`] and must still own its potential
1531
- /// weak reference count.
1532
- ///
1533
- /// It is allowed for the strong count to be 0 at the time of calling this, but the weak count
1534
- /// must be non-zero or the pointer must have originated from a dangling `Weak<T>` (one created
1535
- /// by [`new`]).
1531
+ /// weak reference.
1536
1532
///
1533
+ /// It is allowed for the strong count to be 0 at the time of calling this. Nevertheless, this
1534
+ /// takes ownership of one weak reference currently represented as a raw pointer (the weak
1535
+ /// count is not modified by this operation) and therefore it must be paired with a previous
1536
+ /// call to [`into_raw`].
1537
1537
/// # Examples
1538
1538
///
1539
1539
/// ```
0 commit comments