about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRaoul Strackx <raoul.strackx@fortanix.com>2023-11-09 17:24:19 +0100
committerRaoul Strackx <raoul.strackx@fortanix.com>2023-11-26 11:03:27 +0100
commit4a8ba05a8361b5db3d8fd0907efd993be4d4d5b5 (patch)
tree61a914e607b2a0103a3b68472819050f9b36a43a
parentf74f700952f105536446e415b8df8061bddfb25e (diff)
downloadrust-4a8ba05a8361b5db3d8fd0907efd993be4d4d5b5.tar.gz
rust-4a8ba05a8361b5db3d8fd0907efd993be4d4d5b5.zip
Making `User<T>` and `User<[T]>` `Send`
-rw-r--r--library/std/src/sys/sgx/abi/usercalls/alloc.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/library/std/src/sys/sgx/abi/usercalls/alloc.rs b/library/std/src/sys/sgx/abi/usercalls/alloc.rs
index 817c33b6603..f99cea360f1 100644
--- a/library/std/src/sys/sgx/abi/usercalls/alloc.rs
+++ b/library/std/src/sys/sgx/abi/usercalls/alloc.rs
@@ -185,6 +185,12 @@ pub struct UserRef<T: ?Sized>(UnsafeCell<T>);
 #[unstable(feature = "sgx_platform", issue = "56975")]
 pub struct User<T: UserSafe + ?Sized>(NonNull<UserRef<T>>);
 
+#[unstable(feature = "sgx_platform", issue = "56975")]
+unsafe impl<T: UserSafeSized> Send for User<T> {}
+
+#[unstable(feature = "sgx_platform", issue = "56975")]
+unsafe impl<T: UserSafeSized> Send for User<[T]> {}
+
 trait NewUserRef<T: ?Sized> {
     unsafe fn new_userref(v: T) -> Self;
 }