2023-03-04 02:08:15 -06:00
|
|
|
// edition: 2021
|
2023-08-09 07:31:36 -05:00
|
|
|
// run-rustfix
|
|
|
|
#![allow(unused_must_use, dead_code)]
|
2023-03-04 02:08:15 -06:00
|
|
|
|
|
|
|
use std::future::Future;
|
|
|
|
fn foo() -> impl Future<Output=()> {
|
|
|
|
async { }
|
|
|
|
}
|
|
|
|
|
2023-08-09 07:31:36 -05:00
|
|
|
fn bar(cx: &mut std::task::Context<'_>) {
|
2023-03-04 02:08:15 -06:00
|
|
|
let fut = foo();
|
2023-08-09 07:31:36 -05:00
|
|
|
fut.poll(cx);
|
2023-03-04 02:08:15 -06:00
|
|
|
//~^ ERROR no method named `poll` found for opaque type `impl Future<Output = ()>` in the current scope [E0599]
|
|
|
|
}
|
2023-08-09 07:31:36 -05:00
|
|
|
fn main() {}
|