Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
skade opened this issue Aug 13, 2019 · 1 comment
Open

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

skade opened this issue Aug 13, 2019 · 1 comment

Comments

@skade
Copy link
Contributor

@skade skade commented Aug 13, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.