unused_async for an async fn in a trait #14704
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Uh oh!
There was an error while loading. Please reload this page.
Summary
If you have an async function in a trait that does nothing by default:
sure, the
async
isn't used, but you want implementers to be able to use await in an overridden implementation. In this case,unused_async
should not be warnedLint Name
unused_async
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
No warning
Version
Additional Labels
I-suggestion-causes-warning
The text was updated successfully, but these errors were encountered: