Closed
Description
Summary
Suggestion does not work if the inner expression is async
block.
Reproducer
I tried this code:
let x = (|| async {})().await;
I expected to see this happen:
let x = async {}.await;
Instead, this happened:
let x = async async {}.await;
Version
rustc 1.73.0-nightly (31395ec38 2023-07-24)
binary: rustc
commit-hash: 31395ec38250b60b380fd3c27e94756aba3557de
commit-date: 2023-07-24
host: x86_64-unknown-linux-gnu
release: 1.73.0-nightly
LLVM version: 16.0.5
Additional Labels
@rustbot label +I-suggestion-causes-error