]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/generator-desc.rs
Rollup merge of #106836 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / ui / async-await / generator-desc.rs
1 // edition:2018
2 #![feature(async_closure)]
3 use std::future::Future;
4
5 async fn one() {}
6 async fn two() {}
7
8 fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
9 fn main() {
10     fun(async {}, async {});
11     //~^ ERROR mismatched types
12     fun(one(), two());
13     //~^ ERROR mismatched types
14     fun((async || {})(), (async || {})());
15     //~^ ERROR mismatched types
16 }