4 #![feature(async_closure)]
5 #![warn(clippy::async_yields_async)]
7 use core::future::Future;
9 use core::task::{Context, Poll};
11 struct CustomFutureType;
13 impl Future for CustomFutureType {
16 fn poll(self: Pin<&mut Self>, _: &mut Context) -> Poll<Self::Output> {
21 fn custom_future_type_ctor() -> CustomFutureType {
25 async fn f() -> CustomFutureType {
26 // Don't warn for functions since you have to explicitly declare their
58 let _l = async || CustomFutureType;
60 println!("I'm bored");
63 // Finally something to await
66 let _n = async || custom_future_type_ctor();
67 let _o = async || f();