about summary refs log tree commit diff
path: root/tests/ui/generator/unresolved-ct-var.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/generator/unresolved-ct-var.rs')
-rw-r--r--tests/ui/generator/unresolved-ct-var.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/generator/unresolved-ct-var.rs b/tests/ui/generator/unresolved-ct-var.rs
new file mode 100644
index 00000000000..0a1570fc239
--- /dev/null
+++ b/tests/ui/generator/unresolved-ct-var.rs
@@ -0,0 +1,14 @@
+// incremental
+// edition:2021
+
+fn main() {
+    let _ = async {
+        let s = std::array::from_fn(|_| ()).await;
+        //~^ ERROR `[(); _]` is not a future
+        //~| ERROR type inside `async` block must be known in this context
+        //~| ERROR type inside `async` block must be known in this context
+        //~| ERROR type inside `async` block must be known in this context
+        //~| ERROR type inside `async` block must be known in this context
+        //~| ERROR type inside `async` block must be known in this context
+    };
+}