]> git.lizzy.rs Git - rust.git/blob - src/test/ui/for-loop-while/for-loop-unconstrained-element-type-i32-fallback.rs
Rollup merge of #105955 - Nilstrieb:no-trivial-opt-wrappers-we-have-field-accesses...
[rust.git] / src / test / ui / for-loop-while / for-loop-unconstrained-element-type-i32-fallback.rs
1 // run-pass
2 // Test that the type of `sum` falls back to `i32` here,
3 // and that the for loop desugaring doesn't interfere with
4 // that.
5
6 fn main() {
7     let mut sum = 0;
8     for i in Vec::new() {
9         sum += &i;
10     }
11 }