From 328a75f766ed51aea6787c19c5df8f3e36183849 Mon Sep 17 00:00:00 2001 From: The8472 Date: Fri, 15 Nov 2019 03:54:44 +0100 Subject: [PATCH] use add instead of 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 a056f2abcd6..68d8bba6211 100644 --- a/library/alloc/src/vec.rs +++ b/library/alloc/src/vec.rs @@ -2156,7 +2156,7 @@ where debug_assert_eq!(original_ptr, src_buf); let src_idx = source_iter.ptr; unsafe { - let dst = src_buf.offset(front_buffer.count as isize); + let dst = src_buf.add(front_buffer.count); debug_assert!( dst as *const _ < src_idx, "InPlaceIterable implementation produced more\