about summary refs log tree commit diff
path: root/tests/ui/async-await/for-await-2015.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/for-await-2015.rs')
-rw-r--r--tests/ui/async-await/for-await-2015.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/async-await/for-await-2015.rs b/tests/ui/async-await/for-await-2015.rs
new file mode 100644
index 00000000000..c1b7c016d1f
--- /dev/null
+++ b/tests/ui/async-await/for-await-2015.rs
@@ -0,0 +1,10 @@
+// check-pass
+
+#![feature(async_for_loop)]
+
+// Make sure we don't break `for await` loops in the 2015 edition, where `await` was allowed as an
+// identifier.
+
+fn main() {
+    for await in 0..3 {}
+}