diff --git a/library/std/src/sys/sgx/rwlock/tests.rs b/library/std/src/sys/sgx/rwlock/tests.rs index 05b36c633f861..7b13866257191 100644 --- a/library/std/src/sys/sgx/rwlock/tests.rs +++ b/library/std/src/sys/sgx/rwlock/tests.rs @@ -38,6 +38,6 @@ fn test_c_rwlock_initializer() { zero_stack(); let mut init = MaybeUninit::::zeroed(); rwlock_new(&mut init); - assert_eq!(mem::transmute::<_, [u8; 144]>(init.assume_init()).as_slice(), RWLOCK_INIT) + assert_eq!(&mem::transmute::<_, [u8; 144]>(init.assume_init())[..], RWLOCK_INIT) }; }