Skip to content

unused_async false positive occurs if at least one argument is provided for fn #16825

Description

@CleverWild

Summary

Also reproduces with self and any self-wrapper parameters e.g. self: Arc<Self>.
part of #15305

Reproducer

Code:

async fn test(_arg: i32) {
    todo!()
}
warning: unused `async` for function with no await statements
   --> example.rs:102:1
    |
102 | / async fn test(_arg: i32) {
103 | |     todo!()
104 | | }
    | |_^
    |
    = help: consider removing the `async` from this function
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.94.0/index.html#unused_async

Version

rustc 1.93.0 (254b59607 2026-01-19)
binary: rustc
commit-hash: 254b59607d4417e9dffbc307138ae5c86280fe4c
commit-date: 2026-01-19
host: x86_64-pc-windows-msvc
release: 1.93.0
LLVM version: 21.1.8

Additional Labels

@rustbot label +I-false-positive

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't have

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions