Skip to content

Commit 7300ed8

Browse files
committed
vec: Remove old comment in Vec::drop
This comment was leftover from an earlier revision of a PR, something that never was merged. There is no ZST special casing in Vec::drop.
1 parent 792a9f1 commit 7300ed8

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/libcollections/vec.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,10 +1384,6 @@ impl<T: Ord> Ord for Vec<T> {
13841384
impl<T> Drop for Vec<T> {
13851385
#[unsafe_destructor_blind_to_params]
13861386
fn drop(&mut self) {
1387-
// NOTE: this is currently abusing the fact that ZSTs can't impl Drop.
1388-
// Or rather, that impl'ing Drop makes them not zero-sized. This is
1389-
// OK because exactly when this stops being a valid assumption, we
1390-
// don't need unsafe_no_drop_flag shenanigans anymore.
13911387
if self.buf.unsafe_no_drop_flag_needs_drop() {
13921388
unsafe {
13931389
// The branch on needs_drop() is an -O1 performance optimization.

0 commit comments

Comments
 (0)