summaryrefslogtreecommitdiffstats
path: root/src/test/ui/for/for-loop-type-error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/for/for-loop-type-error.rs')
-rw-r--r--src/test/ui/for/for-loop-type-error.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/for/for-loop-type-error.rs b/src/test/ui/for/for-loop-type-error.rs
new file mode 100644
index 000000000..8d9fc20f0
--- /dev/null
+++ b/src/test/ui/for/for-loop-type-error.rs
@@ -0,0 +1,6 @@
+pub fn main() {
+ let x = () + (); //~ ERROR cannot add `()` to `()`
+
+ // this shouldn't have a flow-on error:
+ for _ in x {}
+}