//@ edition: 2021 //@ check-pass //@ revisions: current next //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver #![feature(async_closure)] use std::future::Future; use std::any::Any; struct Struct; impl Struct { fn method(&self) {} } fn fake_async_closure(_: F) where F: Fn(Struct) -> Fut, Fut: Future, {} fn main() { fake_async_closure(async |s| { s.method(); }) }