Weak's type parameter may dangle on drop
This commit is contained in:
parent
c441675edf
commit
23a4050f7d
2 changed files with 2 additions and 2 deletions
|
@ -2303,7 +2303,7 @@ impl<T: ?Sized> Weak<T> {
|
|||
}
|
||||
|
||||
#[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.
|
||||
///
|
||||
/// # Examples
|
||||
|
|
|
@ -2015,7 +2015,7 @@ impl<T> Default for Weak<T> {
|
|||
}
|
||||
|
||||
#[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.
|
||||
///
|
||||
/// # Examples
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue