mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
15 lines
398 B
Rust
15 lines
398 B
Rust
//@ 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() {}
|