diff options
| author | Ivan Tham <pickfire@riseup.net> | 2020-07-02 12:11:57 +0800 |
|---|---|---|
| committer | Ivan Tham <pickfire@riseup.net> | 2020-08-10 18:13:55 +0800 |
| commit | 2b7f87b5fa43336ed1237747f60fd9095a41ea3d (patch) | |
| tree | bbae028012ecea7c99499e06c8bd7291048a6523 | |
| parent | 13290e83a6e20f3b408d177a9d64d8cf98fe4615 (diff) | |
| download | rust-2b7f87b5fa43336ed1237747f60fd9095a41ea3d.tar.gz rust-2b7f87b5fa43336ed1237747f60fd9095a41ea3d.zip | |
Liballoc tweak use *const T instead of *const i8
*const T is also used in the same parts and also used for arith_offset.
| -rw-r--r-- | library/alloc/src/vec.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<T> Iterator for IntoIter<T> { // 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()) |
