Skip to content

Lint idea: find known-blocking constructs in async contexts #4377

Open
@skade

Description

@skade

With async/await coming up, we will probably see an uptake of such code:

async hello() {
    println!("hello").
}

Users will most likely not be aware that the call to println are blocking. The same goes to any use of the stdlib io apis, most famously to_socket_addr() calls.

I think there is a chance for clippy to at least find obvious cases of this, for a list of known functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lintsT-async-awaitType: Issues related to async/await

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions