diff options
| author | Ralf Jung <post@ralfj.de> | 2020-12-28 00:39:09 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2020-12-28 00:39:09 +0100 |
| commit | 8e0b7f988ee4e12d79c03ed53b3b59fee534330e (patch) | |
| tree | 95a69333090d402f2544306364e7bea07cd15a04 /library/alloc/src/sync.rs | |
| parent | 257becbfe4987d1f7b12af5a8dd5ed96697cd2e8 (diff) | |
| download | rust-8e0b7f988ee4e12d79c03ed53b3b59fee534330e.tar.gz rust-8e0b7f988ee4e12d79c03ed53b3b59fee534330e.zip | |
de-stabilize unsized raw ptr methods for Weak
Diffstat (limited to 'library/alloc/src/sync.rs')
| -rw-r--r-- | library/alloc/src/sync.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index 9d478a302e9..53ba9c283ae 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -1535,7 +1535,7 @@ struct WeakInner<'a> { strong: &'a atomic::AtomicUsize, } -impl<T: ?Sized> Weak<T> { +impl<T> Weak<T> { /// Returns a raw pointer to the object `T` pointed to by this `Weak<T>`. /// /// The pointer is valid only if there are some strong references. The pointer may be dangling, @@ -1668,7 +1668,9 @@ impl<T: ?Sized> Weak<T> { // SAFETY: we now have recovered the original Weak pointer, so can create the Weak. unsafe { Weak { ptr: NonNull::new_unchecked(ptr) } } } +} +impl<T: ?Sized> Weak<T> { /// Attempts to upgrade the `Weak` pointer to an [`Arc`], delaying /// dropping of the inner value if successful. /// |
