mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
Rollup merge of #73063 - pickfire:liballoc-elide, r=kennytm
Elide type on liballoc vec
This commit is contained in:
+1
-1
@@ -984,7 +984,7 @@ fn assert_failed(index: usize, len: usize) -> ! {
|
||||
// bounds check above succeeds there must be a last element (which
|
||||
// can be self[index] itself).
|
||||
let last = ptr::read(self.as_ptr().add(len - 1));
|
||||
let hole: *mut T = self.as_mut_ptr().add(index);
|
||||
let hole = self.as_mut_ptr().add(index);
|
||||
self.set_len(len - 1);
|
||||
ptr::replace(hole, last)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user