Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion library/alloc/src/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3501,7 +3501,13 @@ impl<T: ?Sized, A: Allocator> Weak<T, A> {
/// Attempts to upgrade the `Weak` pointer to an [`Rc`], delaying
/// dropping of the inner value if successful.
///
/// Returns [`None`] if the inner value has since been dropped.
/// Returns [`None`] in the following cases:
///
/// 1. The inner value has since been dropped or moved out.
///
/// 2. This `Weak` does not point to an allocation.
///
/// 3. The owning reference this `Weak` is associated with is either not fully-constructed or does not allow an upgrade.
///
/// # Examples
///
Expand Down
8 changes: 7 additions & 1 deletion library/alloc/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3232,7 +3232,13 @@ impl<T: ?Sized, A: Allocator> Weak<T, A> {
/// Attempts to upgrade the `Weak` pointer to an [`Arc`], delaying
/// dropping of the inner value if successful.
///
/// Returns [`None`] if the inner value has since been dropped.
/// Returns [`None`] in the following cases:
///
/// 1. The inner value has since been dropped or moved out.
///
/// 2. This `Weak` does not point to an allocation.
///
/// 3. The owning reference this `Weak` is associated with is either not fully-constructed or does not allow an upgrade.
///
/// # Examples
///
Expand Down
Loading