]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/suggest-missing-await-closure.rs
Auto merge of #83152 - guswynn:jemallocator_part2, r=Mark-Simulacrum
[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 `await`ing on the `Future`
19         //~| SUGGESTION .await
20     };
21 }
22
23 fn main() {}