Rollup merge of #29614 - bluss:vec-drop-comment, r=Gankro
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.
This commit is contained in:
commit
0171abb0d0
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user