We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
IntoIterator
for [T; N]
1 parent b79af2f commit 32aaea9Copy full SHA for 32aaea9
library/core/src/array/mod.rs
@@ -155,6 +155,16 @@ impl<T: fmt::Debug, const N: usize> fmt::Debug for [T; N] {
155
}
156
157
158
+#[stable(feature = "array_into_iter_impl", since = "1.53.0")]
159
+impl<T, const N: usize> IntoIterator for [T; N] {
160
+ type Item = T;
161
+ type IntoIter = IntoIter<T, N>;
162
+
163
+ fn into_iter(self) -> Self::IntoIter {
164
+ IntoIter::new(self)
165
+ }
166
+}
167
168
#[stable(feature = "rust1", since = "1.0.0")]
169
impl<'a, T, const N: usize> IntoIterator for &'a [T; N] {
170
type Item = &'a T;
0 commit comments