This is related to #4377, which proposed warning about blocking operations like println! inside an async context. That is definitely a promising idea, but it's also very ambitious, because almost anything could block.
But there's also a specific set of blocking constructs that can potentially deadlock the entire tokio (or other) runtime. These include things like calling block_on or .wait inside an async context. There are easy to include by mistake when converting non-async code to async. And there are fewer of these dangerous calls, which would make them easier to lint for.
This is related to #4377, which proposed warning about blocking operations like
println!inside anasynccontext. That is definitely a promising idea, but it's also very ambitious, because almost anything could block.But there's also a specific set of blocking constructs that can potentially deadlock the entire
tokio(or other) runtime. These include things like callingblock_onor.waitinside anasynccontext. There are easy to include by mistake when converting non-asynccode toasync. And there are fewer of these dangerous calls, which would make them easier to lint for.