diff --git a/src/libstd/sys/sgx/rwlock.rs b/src/libstd/sys/sgx/rwlock.rs index 7e2d13b9e2476..784303f3a65e8 100644 --- a/src/libstd/sys/sgx/rwlock.rs +++ b/src/libstd/sys/sgx/rwlock.rs @@ -268,7 +268,7 @@ mod tests { #[inline(never)] unsafe fn rwlock_new(init: &mut MaybeUninit) { - init.set(RWLock::new()); + init.write(RWLock::new()); } unsafe {