error: this `MutexGuard` is held across an `await` point --> $DIR/await_holding_lock.rs:6:9 | LL | let guard = x.lock().unwrap(); | ^^^^^ | = note: `-D clippy::await-holding-lock` implied by `-D warnings` = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await note: these are all the `await` points this lock is held through --> $DIR/await_holding_lock.rs:6:5 | LL | / let guard = x.lock().unwrap(); LL | | baz().await LL | | } | |_^ error: this `MutexGuard` is held across an `await` point --> $DIR/await_holding_lock.rs:21:9 | LL | let guard = x.read().unwrap(); | ^^^^^ | = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await note: these are all the `await` points this lock is held through --> $DIR/await_holding_lock.rs:21:5 | LL | / let guard = x.read().unwrap(); LL | | baz().await LL | | } | |_^ error: this `MutexGuard` is held across an `await` point --> $DIR/await_holding_lock.rs:26:9 | LL | let mut guard = x.write().unwrap(); | ^^^^^^^^^ | = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await note: these are all the `await` points this lock is held through --> $DIR/await_holding_lock.rs:26:5 | LL | / let mut guard = x.write().unwrap(); LL | | baz().await LL | | } | |_^ error: this `MutexGuard` is held across an `await` point --> $DIR/await_holding_lock.rs:51:9 | LL | let guard = x.lock().unwrap(); | ^^^^^ | = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await note: these are all the `await` points this lock is held through --> $DIR/await_holding_lock.rs:51:5 | LL | / let guard = x.lock().unwrap(); LL | | LL | | let second = baz().await; LL | | ... | LL | | first + second + third LL | | } | |_^ error: this `MutexGuard` is held across an `await` point --> $DIR/await_holding_lock.rs:64:13 | LL | let guard = x.lock().unwrap(); | ^^^^^ | = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await note: these are all the `await` points this lock is held through --> $DIR/await_holding_lock.rs:64:9 | LL | / let guard = x.lock().unwrap(); LL | | baz().await LL | | }; | |_____^ error: this `MutexGuard` is held across an `await` point --> $DIR/await_holding_lock.rs:76:13 | LL | let guard = x.lock().unwrap(); | ^^^^^ | = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await note: these are all the `await` points this lock is held through --> $DIR/await_holding_lock.rs:76:9 | LL | / let guard = x.lock().unwrap(); LL | | baz().await LL | | } | |_____^ error: aborting due to 6 previous errors