]> git.lizzy.rs Git - rust.git/blob - src/test/ui/for-loop-while/loop-scope.rs
Merge commit '40b00f4200fbdeefd11815398cb46394b8cb0a5e' into sync_cg_clif-2021-12-30
[rust.git] / src / test / ui / for-loop-while / loop-scope.rs
1 // run-pass
2
3 pub fn main() {
4     let x = vec![10, 20, 30];
5     let mut sum = 0;
6     for x in &x { sum += *x; }
7     assert_eq!(sum, 60);
8 }