unused_async emitted when trait bounds where function is used require it to be async #9359
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
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
Summary
When using actix-web, Clippy warned me that the
async
on one of my handler functions was unused as there was no await. It turned out that the trait bounds on the.to()
method ofactix-web::route::Route
required that the handler function implementedHandler<Args>
which requires an async function.Lint Name
unused_async
Reproducer
I tried this code:
I saw this happen:
Version
Additional Labels
@rustbot label +
I-suggestion-causes-error
The text was updated successfully, but these errors were encountered: