]> git.lizzy.rs Git - rust.git/blob - src/test/ui/for-loop-while/foreach-external-iterators-loop.rs
Auto merge of #75936 - sdroege:chunks-exact-construction-bounds-check, r=nagisa
[rust.git] / src / test / ui / for-loop-while / foreach-external-iterators-loop.rs
1 // run-pass
2
3 pub fn main() {
4     let x = [1; 100];
5     let mut y = 0;
6     for (n,i) in x.iter().enumerate() {
7         if n < 10 {
8             continue;
9         }
10         y += *i;
11     }
12     assert_eq!(y, 90);
13 }