mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-27 01:11:38 +00:00
Make SharedPtr Unpin like UniquePtr
This commit is contained in:
parent
a14eb80ced
commit
ce7c5c467b
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user