From 2b7f87b5fa43336ed1237747f60fd9095a41ea3d Mon Sep 17 00:00:00 2001 From: Ivan Tham Date: Thu, 2 Jul 2020 12:11:57 +0800 Subject: [PATCH] Liballoc tweak use *const T instead of *const i8 *const T is also used in the same parts and also used for arith_offset. --- library/alloc/src/vec.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/alloc/src/vec.rs b/library/alloc/src/vec.rs index 786d1b6ba82..2ff82a5dd3f 100644 --- a/library/alloc/src/vec.rs +++ b/library/alloc/src/vec.rs @@ -2705,7 +2705,7 @@ impl Iterator for IntoIter { // purposefully don't use 'ptr.offset' because for // vectors with 0-size elements this would return the // same pointer. - self.ptr = arith_offset(self.ptr as *const i8, 1) as *mut T; + self.ptr = arith_offset(self.ptr as *const T, 1) as *mut T; // Make up a value of this ZST. Some(mem::zeroed())