3 #![feature(generic_associated_types)]
5 use std::future::Future;
8 type Connecting<'a>: Future + Send
12 fn connect(&'_ self) -> Self::Connecting<'_>;
15 fn call_connect<C>(c: &'_ C) -> impl '_ + Future + Send
17 C: Client + Send + Sync,
19 async move { c.connect().await }
20 //~^ ERROR `C` does not live long enough
22 // FIXME(#71723). This is because we infer at some point a value of
24 // impl Future<Output = <C as Client>::Connection<'_>>
26 // and then we somehow fail the WF check because `where C: 'a` is not known,
27 // but I'm not entirely sure how that comes about.