summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/issue-108572.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/issue-108572.fixed')
-rw-r--r--tests/ui/async-await/issue-108572.fixed16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/async-await/issue-108572.fixed b/tests/ui/async-await/issue-108572.fixed
new file mode 100644
index 000000000..8f0133d97
--- /dev/null
+++ b/tests/ui/async-await/issue-108572.fixed
@@ -0,0 +1,16 @@
+// edition: 2021
+// run-rustfix
+#![allow(unused_must_use, dead_code)]
+
+use std::future::Future;
+fn foo() -> impl Future<Output=()> {
+ async { }
+}
+
+fn bar(cx: &mut std::task::Context<'_>) {
+ let fut = foo();
+ let mut pinned = std::pin::pin!(fut);
+ pinned.as_mut().poll(cx);
+ //~^ ERROR no method named `poll` found for opaque type `impl Future<Output = ()>` in the current scope [E0599]
+}
+fn main() {}