summaryrefslogtreecommitdiffstats
path: root/tests/ui/for-loop-while/for-loop-unconstrained-element-type-i32-fallback.rs
blob: a1e9b1ed87d0dcb0e0aba8fec9c5bfea7b4c64e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
// run-pass
// Test that the type of `sum` falls back to `i32` here,
// and that the for loop desugaring doesn't interfere with
// that.

fn main() {
    let mut sum = 0;
    for i in Vec::new() {
        sum += &i;
    }
}