summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/issue-108572.fixed
blob: 8f0133d97b547e800ccc6c760976d58f998cf1a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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() {}