Files
rust/tests/ui/traits/next-solver/async.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
345 B
Rust
Raw Normal View History

2023-12-14 13:11:28 +01:00
//@ compile-flags: -Znext-solver
2023-01-24 23:38:20 +00:00
//@ 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 {});
//[fail]~^ ERROR type mismatch resolving `() == i32`
2023-01-24 23:38:20 +00:00
}
#[cfg(pass)]
fn main() {
needs_async(async { 1i32 });
}