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 50f8aad commit 30c4a25Copy full SHA for 30c4a25
src/libcore/array/mod.rs
@@ -200,6 +200,20 @@ where
200
}
201
202
203
+#[cfg(not(bootstrap))]
204
+#[stable(feature = "array_into_iter_impl", since = "1.41.0")]
205
+impl<T, const N: usize> IntoIterator for [T; N]
206
+where
207
+ [T; N]: LengthAtMost32,
208
+{
209
+ type Item = T;
210
+ type IntoIter = IntoIter<T, {N}>;
211
+
212
+ fn into_iter(self) -> Self::IntoIter {
213
+ IntoIter::new(self)
214
+ }
215
+}
216
217
#[stable(feature = "rust1", since = "1.0.0")]
218
impl<'a, T, const N: usize> IntoIterator for &'a [T; N]
219
where
0 commit comments