]> git.proxmox.com Git - rustc.git/blob - tests/ui/async-await/suggest-missing-await-closure.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / 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() {}