explain purpose of test

This commit is contained in:
Niko Matsakis 2017-06-15 12:27:15 -04:00 committed by Brian Anderson
parent 818fa6e09c
commit 7ded8a9066

View file

@ -8,6 +8,12 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// 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
}