This commit is contained in:
The 8472 2023-07-29 16:08:24 +02:00
parent 78c988fe3e
commit fd8ba7bc3c

View File

@ -136,7 +136,7 @@ pub(super) fn forget_allocation_drop_remaining(&mut self) {
/// Forgets to Drop the remaining elements while still allowing the backing allocation to be freed.
pub(crate) fn forget_remaining_elements(&mut self) {
// For th ZST case, it is crucial that we mutate `end` here, not `ptr`.
// For the ZST case, it is crucial that we mutate `end` here, not `ptr`.
// `ptr` must stay aligned, while `end` may be unaligned.
self.end = self.ptr;
}