fork/rust
git clone https://git.julia.blue/fork/rust
f3e1a954d2e
1.41.1
1// edition:2018 2// run-rustfix 3 4#![feature(async_closure)] 5 6fn take_u32(_x: u32) {} 7 8async fn make_u32() -> u32 { 9 22 10} 11 12#[allow(unused)] 13async fn suggest_await_in_async_closure() { 14 async || { 15 let x = make_u32(); 16 take_u32(x.await) 17 //~^ ERROR mismatched types [E0308] 18 //~| HELP consider using `.await` here 19 //~| SUGGESTION x.await 20 }; 21} 22 23fn main() {}