summaryrefslogtreecommitdiffstats
path: root/library/alloc/src/vec/in_place_collect.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/alloc/src/vec/in_place_collect.rs')
-rw-r--r--library/alloc/src/vec/in_place_collect.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/vec/in_place_collect.rs b/library/alloc/src/vec/in_place_collect.rs
index 55dcb84ad..b211421b2 100644
--- a/library/alloc/src/vec/in_place_collect.rs
+++ b/library/alloc/src/vec/in_place_collect.rs
@@ -267,7 +267,7 @@ where
// one slot in the underlying storage will have been freed up and we can immediately
// write back the result.
unsafe {
- let dst = dst_buf.offset(i as isize);
+ let dst = dst_buf.add(i);
debug_assert!(dst as *const _ <= end, "InPlaceIterable contract violation");
ptr::write(dst, self.__iterator_get_unchecked(i));
// Since this executes user code which can panic we have to bump the pointer