Skip to content

Commit e15fee9

Browse files
Rollup merge of #78854 - the8472:workaround-normalization-regression-master, r=Mark-Simulacrum
Workaround for "could not fully normalize" ICE Workaround for "could not fully normalize" ICE (#78139) by removing the `needs_drop::<T>()` calls triggering it. Corresponding beta PR: #78845 Fixes #78139 -- the underlying bug is likely not fixed but we don't have another test case isolated for now, so closing.
2 parents 9c48688 + 8c7046e commit e15fee9

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

library/alloc/src/vec.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -2136,10 +2136,8 @@ impl<T> InPlaceDrop<T> {
21362136
impl<T> Drop for InPlaceDrop<T> {
21372137
#[inline]
21382138
fn drop(&mut self) {
2139-
if mem::needs_drop::<T>() {
2140-
unsafe {
2141-
ptr::drop_in_place(slice::from_raw_parts_mut(self.inner, self.len()));
2142-
}
2139+
unsafe {
2140+
ptr::drop_in_place(slice::from_raw_parts_mut(self.inner, self.len()));
21432141
}
21442142
}
21452143
}
@@ -2871,10 +2869,8 @@ impl<T> IntoIter<T> {
28712869
}
28722870

28732871
fn drop_remaining(&mut self) {
2874-
if mem::needs_drop::<T>() {
2875-
unsafe {
2876-
ptr::drop_in_place(self.as_mut_slice());
2877-
}
2872+
unsafe {
2873+
ptr::drop_in_place(self.as_mut_slice());
28782874
}
28792875
self.ptr = self.end;
28802876
}

0 commit comments

Comments
 (0)