diff --git a/src/arena.rs b/src/arena.rs index b65dec71..b9f2ae78 100644 --- a/src/arena.rs +++ b/src/arena.rs @@ -566,7 +566,7 @@ impl ArenaAllocated for IndexPtr { /// # Safety /// - the caller must guarantee that the pointee type of UntypedArenaPtr is T unsafe fn typed_ptr(ptr: UntypedArenaPtr) -> TypedArenaPtr { - unsafe { TypedArenaPtr::new(std::mem::transmute::<_, *mut IndexPtr>(ptr.get_ptr())) } + unsafe { TypedArenaPtr::new(ptr.get_ptr().cast_mut().cast::()) } } #[inline]