diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2017-06-15 12:27:15 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-15 12:27:15 -0400 |
| commit | d5fd8fef67a0a0b4d30dd8b23052c380632ae0e2 (patch) | |
| tree | 3c0982d5bca26dac036d7906ff7e9ff0b799e4e6 | |
| parent | a80840f75196b69ea3f6c8b1fdaa032be609e9f5 (diff) | |
| download | rust-d5fd8fef67a0a0b4d30dd8b23052c380632ae0e2.tar.gz rust-d5fd8fef67a0a0b4d30dd8b23052c380632ae0e2.zip | |
explain purpose of test
| -rw-r--r-- | src/test/compile-fail/for-loop-unconstrained-element-type.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/compile-fail/for-loop-unconstrained-element-type.rs b/src/test/compile-fail/for-loop-unconstrained-element-type.rs index f7dccc7f2ac..dd09e4a79ec 100644 --- a/src/test/compile-fail/for-loop-unconstrained-element-type.rs +++ b/src/test/compile-fail/for-loop-unconstrained-element-type.rs @@ -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 } |
