summaryrefslogtreecommitdiffstats
path: root/tests/ui/generator/unresolved-ct-var-drop-tracking.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/generator/unresolved-ct-var-drop-tracking.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/generator/unresolved-ct-var-drop-tracking.rs b/tests/ui/generator/unresolved-ct-var-drop-tracking.rs
new file mode 100644
index 000000000..a6589348d
--- /dev/null
+++ b/tests/ui/generator/unresolved-ct-var-drop-tracking.rs
@@ -0,0 +1,15 @@
+// incremental
+// edition:2021
+// compile-flags: -Zdrop-tracking
+
+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
+ };
+}