blob: 9a58104910799e181acc34a03a7fe0a4648e4109 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//@ edition:2018
use std::future::Future;
async fn one() {}
async fn two() {}
fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
fn main() {
fun(async {}, async {});
//~^ ERROR mismatched types
fun(one(), two());
//~^ ERROR mismatched types
fun((async || {})(), (async || {})());
//~^ ERROR mismatched types
}
|