summaryrefslogtreecommitdiffstats
path: root/src/test/ui/for/for-loop-unconstrained-element-type.rs
blob: 0c7a3516a14ca0c16d544e79ec978051406a6d22 (plain)
1
2
3
4
5
6
7
8
9
// Test that `for` loops don't introduce artificial
// constraints on the type of the binding (`i`).
// Subtle changes in the desugaring can cause the
// type of elements in the vector to (incorrectly)
// fallback to `!` or `()`.

fn main() {
    for i in Vec::new() { } //~ ERROR type annotations needed
}