unused_async
not triggering when function only uses .await
in an async block
#10800
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
Summary
it seems the lint is simply checking for an occurrence of
.await
literal in the code, this is not always accurate, we can put an async block inside a sync function and use.await
in the block, so making that function async is unnecessary but the lint still doesnt triggerLint Name
unused_async
Reproducer
playground link: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=c31e923630b481e7c9d6c40a610d84a2
Version
The text was updated successfully, but these errors were encountered: