Suggestion: warn if no await inside async fn or block #4629
Labels
A-lint
Area: New lints
L-correctness
Lint: Belongs in the correctness lint group
T-async-await
Type: Issues related to async/await
In general, if you aren't
await
ing anything, then there is no reason to have anasync fn
orasync {…}
. Usingasync
where it is not needed can lead to unnecessary overhead. This lint would alert users to cases where they may have started off writing something as async, but then refactored, removing all await points without deleting theasync
keyword.The text was updated successfully, but these errors were encountered: