]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/suggest-missing-await-closure.rs
Rollup merge of #71627 - ldm0:autoderefarg, r=Dylan-DPC
[rust.git] / src / test / ui / async-await / suggest-missing-await-closure.rs
1 // edition:2018
2 // run-rustfix
3
4 #![feature(async_closure)]
5
6 fn take_u32(_x: u32) {}
7
8 async fn make_u32() -> u32 {
9     22
10 }
11
12 #[allow(unused)]
13 async fn suggest_await_in_async_closure() {
14     async || {
15         let x = make_u32();
16         take_u32(x)
17         //~^ ERROR mismatched types [E0308]
18         //~| HELP consider using `.await` here
19         //~| SUGGESTION x.await
20     };
21 }
22
23 fn main() {}