diff --git a/crates/oxc_index/src/lib.rs b/crates/oxc_index/src/lib.rs index 22f0504af86d8..6d8f21be934f0 100644 --- a/crates/oxc_index/src/lib.rs +++ b/crates/oxc_index/src/lib.rs @@ -343,12 +343,11 @@ impl IndexVec { self.raw.pop() } - /// Converts the vector into an owned IdxSlice, dropping excess capacity. + /// Converts the vector into an owned [`IndexSlice`], dropping excess capacity. #[inline] - pub fn into_boxed_slice(self) -> alloc::boxed::Box> { + pub fn into_boxed_slice(self) -> Box> { let b = self.raw.into_boxed_slice(); // SAFETY: `IndexSlice` is a thin wrapper around `[T]` with the added marker for the index. - unsafe { Box::from_raw(Box::into_raw(b) as *mut IndexSlice) } }