2229: Annotate stdlib with insignficant dtors

This commit is contained in:
Aman Arora
2021-09-21 04:04:50 -04:00
parent 95cfbe43d2
commit 099a34cd95
8 changed files with 9 additions and 0 deletions

View File

@@ -180,6 +180,7 @@ impl<T, const N: usize> DoubleEndedIterator for IntoIter<T, N> {
#[stable(feature = "array_value_iter_impls", since = "1.40.0")]
impl<T, const N: usize> Drop for IntoIter<T, N> {
#[rustc_insignificant_dtor]
fn drop(&mut self) {
// SAFETY: This is safe: `as_mut_slice` returns exactly the sub-slice
// of elements that have not been moved out yet and that remain