Skip to content

Commit

Permalink
Rollup merge of rust-lang#29614 - bluss:vec-drop-comment, r=Gankro
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
steveklabnik committed Nov 5, 2015
2 parents 15dd417 + 7300ed8 commit 0171abb
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 0171abb

Please sign in to comment.