Skip to content

Commit e46248a

Browse files
committed
Making User<T> and User<[T]> Send
1 parent f74f700 commit e46248a

File tree

1 file changed

+6
-0
lines changed
  • library/std/src/sys/sgx/abi/usercalls

1 file changed

+6
-0
lines changed

library/std/src/sys/sgx/abi/usercalls/alloc.rs

+6
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ pub struct UserRef<T: ?Sized>(UnsafeCell<T>);
185185
#[unstable(feature = "sgx_platform", issue = "56975")]
186186
pub struct User<T: UserSafe + ?Sized>(NonNull<UserRef<T>>);
187187

188+
#[unstable(feature = "sgx_platform", issue = "56975")]
189+
unsafe impl<T: UserSafeSized> Send for User<T>{}
190+
191+
#[unstable(feature = "sgx_platform", issue = "56975")]
192+
unsafe impl<T: UserSafeSized> Send for User<[T]>{}
193+
188194
trait NewUserRef<T: ?Sized> {
189195
unsafe fn new_userref(v: T) -> Self;
190196
}

0 commit comments

Comments
 (0)