From 4a8ba05a8361b5db3d8fd0907efd993be4d4d5b5 Mon Sep 17 00:00:00 2001 From: Raoul Strackx Date: Thu, 9 Nov 2023 17:24:19 +0100 Subject: [PATCH] Making `User` and `User<[T]>` `Send` --- library/std/src/sys/sgx/abi/usercalls/alloc.rs | 6 ++++++ 1 file changed, 6 insertions(+) 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(UnsafeCell); #[unstable(feature = "sgx_platform", issue = "56975")] pub struct User(NonNull>); +#[unstable(feature = "sgx_platform", issue = "56975")] +unsafe impl Send for User {} + +#[unstable(feature = "sgx_platform", issue = "56975")] +unsafe impl Send for User<[T]> {} + trait NewUserRef { unsafe fn new_userref(v: T) -> Self; }