1
Fork 0

Weak's type parameter may dangle on drop

This commit is contained in:
David Tolnay 2021-05-20 19:43:41 -07:00
parent c441675edf
commit 23a4050f7d
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
2 changed files with 2 additions and 2 deletions

View file

@ -2303,7 +2303,7 @@ impl<T: ?Sized> Weak<T> {
} }
#[stable(feature = "rc_weak", since = "1.4.0")] #[stable(feature = "rc_weak", since = "1.4.0")]
impl<T: ?Sized> Drop for Weak<T> { unsafe impl<#[may_dangle] T: ?Sized> Drop for Weak<T> {
/// Drops the `Weak` pointer. /// Drops the `Weak` pointer.
/// ///
/// # Examples /// # Examples

View file

@ -2015,7 +2015,7 @@ impl<T> Default for Weak<T> {
} }
#[stable(feature = "arc_weak", since = "1.4.0")] #[stable(feature = "arc_weak", since = "1.4.0")]
impl<T: ?Sized> Drop for Weak<T> { unsafe impl<#[may_dangle] T: ?Sized> Drop for Weak<T> {
/// Drops the `Weak` pointer. /// Drops the `Weak` pointer.
/// ///
/// # Examples /// # Examples