blob: 11ba7d29abaf95669cacadc634fa6b50b53b7d5a [file] [log] [blame] [edit]
use std::{
future::Future,
pin::Pin,
task::{Context, Poll},
};
struct FutureWrapper<F> {
fut: F,
}
impl<F> Future for FutureWrapper<F>
where
F: Future,
{
type Output = F::Output;
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
let res = self.fut.poll(cx);
//~^ ERROR no method named `poll` found for type parameter `F` in the current scope
res
}
}
fn main() {}