Skip to content

Commit

Permalink
Rollup merge of rust-lang#73063 - pickfire:liballoc-elide, r=kennytm
Browse files Browse the repository at this point in the history
Elide type on liballoc vec
  • Loading branch information
Dylan-DPC committed Jun 7, 2020
2 parents de1941a + 758aa23 commit a23b51e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/liballoc/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ impl<T> Vec<T> {
// 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)
}
Expand Down

0 comments on commit a23b51e

Please sign in to comment.