1 // Regression test for #64477.
3 // We were incorrectly claiming that the `f(x).await` future captured
4 // a value of type `T`, and hence that `T: Send` would have to hold.
9 use std::future::Future;
12 fn f<T>(_: &T) -> Pin<Box<dyn Future<Output = ()> + Send>> {
16 pub fn g<T: Sync>(x: &'static T) -> impl Future<Output = ()> + Send {
17 async move { f(x).await }