cubecl_core/frontend/iter/traits/collect.rs
1use crate::prelude::*;
2
3/// The expand half of [`IntoIterator`](core::iter::IntoIterator), which is what `zip` accepts.
4pub trait IntoIteratorExpand {
5 /// The iterator this turns into.
6 type IntoIter: IndexedIteratorExpand;
7
8 /// See [`IntoIterator::into_iter`](core::iter::IntoIterator::into_iter).
9 fn __expand_into_iter_method(self, scope: &Scope) -> Self::IntoIter;
10}
11
12impl<I: IndexedIteratorExpand> IntoIteratorExpand for I {
13 type IntoIter = I;
14
15 fn __expand_into_iter_method(self, _scope: &Scope) -> I {
16 self
17 }
18}