mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Support "for loop" MIR lowering
This commit is contained in:
parent
ac04bfd7a7
commit
6377d50bd1
8 changed files with 292 additions and 79 deletions
|
@ -728,6 +728,20 @@ pub mod iter {
|
|||
self
|
||||
}
|
||||
}
|
||||
pub struct IntoIter<T, const N: usize>([T; N]);
|
||||
impl<T, const N: usize> IntoIterator for [T; N] {
|
||||
type Item = T;
|
||||
type IntoIter = IntoIter<T, N>;
|
||||
fn into_iter(self) -> I {
|
||||
IntoIter(self)
|
||||
}
|
||||
}
|
||||
impl<T, const N: usize> Iterator for IntoIter<T, N> {
|
||||
type Item = T;
|
||||
fn next(&mut self) -> Option<T> {
|
||||
loop {}
|
||||
}
|
||||
}
|
||||
}
|
||||
pub use self::collect::IntoIterator;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue