2023-01-24 17:38:20 -06:00
|
|
|
// compile-flags: -Ztrait-solver=next
|
|
|
|
// edition: 2021
|
|
|
|
// revisions: pass fail
|
|
|
|
//[pass] check-pass
|
|
|
|
|
|
|
|
use std::future::Future;
|
|
|
|
|
|
|
|
fn needs_async(_: impl Future<Output = i32>) {}
|
|
|
|
|
|
|
|
#[cfg(fail)]
|
|
|
|
fn main() {
|
|
|
|
needs_async(async {});
|
2023-06-27 16:13:50 -05:00
|
|
|
//[fail]~^ ERROR type mismatch
|
2023-01-24 17:38:20 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(pass)]
|
|
|
|
fn main() {
|
|
|
|
needs_async(async { 1i32 });
|
|
|
|
}
|