未验证 提交 a23b51eb 编写于 作者: D Dylan DPC 提交者: GitHub

Rollup merge of #73063 - pickfire:liballoc-elide, r=kennytm

Elide type on liballoc vec
......@@ -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)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册