rust-lang / rust-lang/rust-clippy
Lint idea: find known-blocking constructs in async contexts
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by examining Clippy's existing lint conventions and the async examples described here, including println!, standard-library I/O APIs, and to_socket_addr(). Define the supported blocking-function list and verify that detection is limited to async contexts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100