Open peterjoel opened 2 years ago
This is almost certainly caused by https://github.com/rust-lang/rust/issues/57478, so this depends on https://github.com/rust-lang/rust/issues/69663.
Also note that this lint was already generalized and put into rustc as must_not_suspend
, however that is off by default because of the same bug.
another duplicate of https://github.com/rust-lang/rust-clippy/issues/6446?
Summary
The code below triggers
await_holding_lock
. However, the guards are dropped explicitly before each.await
so there should not be a problem.Lint Name
await_holding_lock
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
We expected no errors because the guards are explicitly dropped before each await point.
Version
Additional Labels
No response