// edition: 2021 use std::future::Future; async fn bop() { fold(run(), |mut foo| async move { &mut foo.bar; }) } fn fold(_: Foo, f: F) where F: FnMut(Foo) -> Fut, { loop {} } struct Foo { bar: Vec, } fn run() -> Foo> { //~^ ERROR type annotations needed loop {} } fn main() {}