summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/issue-108572.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/issue-108572.rs')
-rw-r--r--tests/ui/async-await/issue-108572.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/async-await/issue-108572.rs b/tests/ui/async-await/issue-108572.rs
new file mode 100644
index 000000000..efcb8b8eb
--- /dev/null
+++ b/tests/ui/async-await/issue-108572.rs
@@ -0,0 +1,12 @@
+// edition: 2021
+
+use std::future::Future;
+fn foo() -> impl Future<Output=()> {
+ async { }
+}
+
+fn main() {
+ let fut = foo();
+ fut.poll();
+ //~^ ERROR no method named `poll` found for opaque type `impl Future<Output = ()>` in the current scope [E0599]
+}