Skip to content

Commit

Permalink
vec: Remove old comment in Vec::drop
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bluss committed Nov 5, 2015
1 parent 792a9f1 commit 7300ed8
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1384,10 +1384,6 @@ impl<T: Ord> Ord for Vec<T> {
impl<T> Drop for Vec<T> {
#[unsafe_destructor_blind_to_params]
fn drop(&mut self) {
// NOTE: this is currently abusing the fact that ZSTs can't impl Drop.
// Or rather, that impl'ing Drop makes them not zero-sized. This is
// OK because exactly when this stops being a valid assumption, we
// don't need unsafe_no_drop_flag shenanigans anymore.
if self.buf.unsafe_no_drop_flag_needs_drop() {
unsafe {
// The branch on needs_drop() is an -O1 performance optimization.
Expand Down

0 comments on commit 7300ed8

Please sign in to comment.