-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have
Description
Summary
Example code that triggers it
async fn unimplemented_task() -> Result<(), String> {
todo!("Implement task");
}
warning: unused `async` for function with no await statements
= help: consider removing the `async` from this function
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_async
= note: `-W clippy::unused-async` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::unused_async)]`
I expected that todo!() or unimplemented!() would silence the lint. The fix isn't helpful since the stubbed code will eventually be async, is awaited by other partially implemented code, and has the defacto type of never.
Lint Name
No response
Reproducer
I tried this code:
<code>I saw this happen:
<output>
I expected to see this happen:
Version
Additional Labels
No response
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have