about summary refs log tree commit diff
path: root/library/core/src/array/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-12-05 12:53:01 +0000
committerbors <bors@rust-lang.org>2021-12-05 12:53:01 +0000
commit1597728ef5820d3ffcb9d3f0c890ef7802398751 (patch)
tree1a86c2a2cb56d502776e6cc3936ec683efb62ffb /library/core/src/array/mod.rs
parentcafc4582e66c478b6b297ae85b225c788106015e (diff)
parent27d39357b7052d96e1b3903518841d14534c38cf (diff)
downloadrust-1597728ef5820d3ffcb9d3f0c890ef7802398751.tar.gz
rust-1597728ef5820d3ffcb9d3f0c890ef7802398751.zip
Auto merge of #88611 - m-ou-se:array-into-iter-new-deprecate, r=joshtriplett
Deprecate array::IntoIter::new.
Diffstat (limited to 'library/core/src/array/mod.rs')
-rw-r--r--library/core/src/array/mod.rs21
1 files changed, 0 insertions, 21 deletions
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs
index d635829151e..23fd1453e54 100644
--- a/library/core/src/array/mod.rs
+++ b/library/core/src/array/mod.rs
@@ -243,27 +243,6 @@ impl<T: fmt::Debug, const N: usize> fmt::Debug for [T; N] {
     }
 }
 
-// Note: the `#[rustc_skip_array_during_method_dispatch]` on `trait IntoIterator`
-// hides this implementation from explicit `.into_iter()` calls on editions < 2021,
-// so those calls will still resolve to the slice implementation, by reference.
-#[stable(feature = "array_into_iter_impl", since = "1.53.0")]
-impl<T, const N: usize> IntoIterator for [T; N] {
-    type Item = T;
-    type IntoIter = IntoIter<T, N>;
-
-    /// Creates a consuming iterator, that is, one that moves each value out of
-    /// the array (from start to end). The array cannot be used after calling
-    /// this unless `T` implements `Copy`, so the whole array is copied.
-    ///
-    /// Arrays have special behavior when calling `.into_iter()` prior to the
-    /// 2021 edition -- see the [array] Editions section for more information.
-    ///
-    /// [array]: prim@array
-    fn into_iter(self) -> Self::IntoIter {
-        IntoIter::new(self)
-    }
-}
-
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a, T, const N: usize> IntoIterator for &'a [T; N] {
     type Item = &'a T;