diff --git a/src/lib.rs b/src/lib.rs index d7158f2..5960f58 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -306,7 +306,7 @@ impl ArrayVec { unsafe { // infallible // The spot to put the new value { - let p = self.get_unchecked_mut(index) as *mut _; + let p: *mut _ = self.get_unchecked_mut(index); // Shift everything over to make space. (Duplicating the // `index`th element into two consecutive places.) ptr::copy(p, p.offset(1), len - index);