blob: ad19d93b93a3c525348558b74340d0ab711d5562 [file] [log] [blame]
//@ edition: 2024
// Make sure the error message is understandable when an `AsyncFn` goal is not satisfied
// (due to closure kind), and that goal originates from an RPIT.
fn repro(foo: impl Into<bool>) -> impl AsyncFn() {
let inner_fn = async move || {
//~^ ERROR expected a closure that implements the `AsyncFn` trait
let _ = foo.into();
};
inner_fn
}
fn main() {}