Make SharedPtr Unpin like UniquePtr

This commit is contained in:
David Tolnay 2022-09-02 14:27:26 -07:00
parent a14eb80ced
commit ce7c5c467b
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -101,6 +101,10 @@ where
}
}
// SharedPtr is not a self-referential type and is safe to move out of a Pin,
// regardless whether the pointer's target is Unpin.
impl<T> Unpin for SharedPtr<T> where T: SharedPtrTarget {}
impl<T> Drop for SharedPtr<T>
where
T: SharedPtrTarget,