]> git.lizzy.rs Git - rust.git/blob - tests/ui/for-loop-while/foreach-external-iterators.rs
Rollup merge of #106709 - khuey:disable_split_dwarf_inlining_by_default, r=davidtwco
[rust.git] / tests / ui / for-loop-while / foreach-external-iterators.rs
1 // run-pass
2
3 pub fn main() {
4     let x = [1; 100];
5     let mut y = 0;
6     for i in &x[..] {
7         y += *i
8     }
9     assert_eq!(y, 100);
10 }