Skip to content

Commit d5fd8fe

Browse files
authored
explain purpose of test
1 parent a80840f commit d5fd8fe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/compile-fail/for-loop-unconstrained-element-type.rs

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// Test that `for` loops don't introduce artificial
12+
// constraints on the type of the binding (`i`).
13+
// Subtle changes in the desugaring can cause the
14+
// type of elements in the vector to (incorrectly)
15+
// fallback to `!` or `()`.
16+
1117
fn main() {
1218
for i in Vec::new() { } //~ ERROR type annotations needed
1319
}

0 commit comments

Comments
 (0)