2022-02-12 10:23:07 +01:00
|
|
|
error: this `MutexGuard` is held across an `await` point
|
2021-10-23 09:42:52 +02:00
|
|
|
--> $DIR/await_holding_lock.rs:6:9
|
2020-04-07 21:20:37 -07:00
|
|
|
|
|
|
|
|
LL | let guard = x.lock().unwrap();
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::await-holding-lock` implied by `-D warnings`
|
2022-02-12 10:23:07 +01:00
|
|
|
= 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
|
2021-10-23 09:42:52 +02:00
|
|
|
--> $DIR/await_holding_lock.rs:6:5
|
2020-04-07 21:20:37 -07:00
|
|
|
|
|
|
|
|
LL | / let guard = x.lock().unwrap();
|
|
|
|
LL | | baz().await
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
2022-02-12 10:23:07 +01:00
|
|
|
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
|
2020-04-07 21:20:37 -07:00
|
|
|
|
|
|
|
|
LL | let guard = x.lock().unwrap();
|
|
|
|
| ^^^^^
|
|
|
|
|
|
2022-02-12 10:23:07 +01:00
|
|
|
= 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
|
2020-04-07 21:20:37 -07:00
|
|
|
|
|
|
|
|
LL | / let guard = x.lock().unwrap();
|
|
|
|
LL | |
|
|
|
|
LL | | let second = baz().await;
|
|
|
|
LL | |
|
|
|
|
... |
|
|
|
|
LL | | first + second + third
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
2022-02-12 10:23:07 +01:00
|
|
|
error: this `MutexGuard` is held across an `await` point
|
|
|
|
--> $DIR/await_holding_lock.rs:64:13
|
2020-04-16 23:21:49 -07:00
|
|
|
|
|
|
|
|
LL | let guard = x.lock().unwrap();
|
|
|
|
| ^^^^^
|
|
|
|
|
|
2022-02-12 10:23:07 +01:00
|
|
|
= 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
|
2020-04-16 23:21:49 -07:00
|
|
|
|
|
|
|
|
LL | / let guard = x.lock().unwrap();
|
|
|
|
LL | | baz().await
|
|
|
|
LL | | };
|
|
|
|
| |_____^
|
|
|
|
|
2022-02-12 10:23:07 +01:00
|
|
|
error: this `MutexGuard` is held across an `await` point
|
|
|
|
--> $DIR/await_holding_lock.rs:76:13
|
2020-04-16 23:21:49 -07:00
|
|
|
|
|
|
|
|
LL | let guard = x.lock().unwrap();
|
|
|
|
| ^^^^^
|
|
|
|
|
|
2022-02-12 10:23:07 +01:00
|
|
|
= 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
|
2020-04-16 23:21:49 -07:00
|
|
|
|
|
|
|
|
LL | / let guard = x.lock().unwrap();
|
|
|
|
LL | | baz().await
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
2022-02-12 10:23:07 +01:00
|
|
|
error: aborting due to 6 previous errors
|
2020-04-07 21:20:37 -07:00
|
|
|
|