2022-02-26 07:26:21 -06:00
|
|
|
error: this `MutexGuard` is held across an `await` point
|
|
|
|
--> $DIR/await_holding_lock.rs:9:13
|
2020-04-07 23:20:37 -05:00
|
|
|
|
|
2022-02-26 07:26:21 -06:00
|
|
|
LL | let guard = x.lock().unwrap();
|
|
|
|
| ^^^^^
|
2020-04-07 23:20:37 -05:00
|
|
|
|
|
2022-02-26 07:26:21 -06: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:9:9
|
2020-04-07 23:20:37 -05:00
|
|
|
|
|
2022-02-26 07:26:21 -06:00
|
|
|
LL | / let guard = x.lock().unwrap();
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-02-26 07:26:21 -06:00
|
|
|
LL | | baz().await
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
2022-09-22 11:04:22 -05:00
|
|
|
= note: `-D clippy::await-holding-lock` implied by `-D warnings`
|
2020-04-07 23:20:37 -05:00
|
|
|
|
2022-02-26 07:26:21 -06:00
|
|
|
error: this `MutexGuard` is held across an `await` point
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:25:13
|
2020-04-07 23:20:37 -05:00
|
|
|
|
|
2022-02-26 07:26:21 -06:00
|
|
|
LL | let guard = x.read().unwrap();
|
|
|
|
| ^^^^^
|
2020-04-07 23:20:37 -05:00
|
|
|
|
|
2022-02-26 07:26:21 -06: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
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:25:9
|
2020-04-07 23:20:37 -05:00
|
|
|
|
|
2022-02-26 07:26:21 -06:00
|
|
|
LL | / let guard = x.read().unwrap();
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-02-26 07:26:21 -06:00
|
|
|
LL | | baz().await
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `MutexGuard` is held across an `await` point
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:31:13
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
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
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:31:9
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
LL | / let mut guard = x.write().unwrap();
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-02-26 07:26:21 -06:00
|
|
|
LL | | baz().await
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `MutexGuard` is held across an `await` point
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:53:13
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
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
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:53:9
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
LL | / let guard = x.lock().unwrap();
|
2020-04-07 23:20:37 -05:00
|
|
|
LL | |
|
|
|
|
LL | |
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | | let second = baz().await;
|
2020-04-07 23:20:37 -05:00
|
|
|
... |
|
2022-02-26 07:26:21 -06:00
|
|
|
LL | | first + second + third
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
2020-04-07 23:20:37 -05:00
|
|
|
|
2022-02-26 07:26:21 -06:00
|
|
|
error: this `MutexGuard` is held across an `await` point
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:67:17
|
2020-04-17 01:21:49 -05:00
|
|
|
|
|
2022-02-26 07:26:21 -06:00
|
|
|
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
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:67:13
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
LL | / let guard = x.lock().unwrap();
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-02-26 07:26:21 -06:00
|
|
|
LL | | baz().await
|
|
|
|
LL | | };
|
|
|
|
| |_________^
|
|
|
|
|
|
|
|
error: this `MutexGuard` is held across an `await` point
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:80:17
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
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
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:80:13
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
LL | / let guard = x.lock().unwrap();
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-02-26 07:26:21 -06:00
|
|
|
LL | | baz().await
|
|
|
|
LL | | }
|
|
|
|
| |_________^
|
|
|
|
|
|
|
|
error: this `MutexGuard` is held across an `await` point
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:93:13
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
LL | let guard = x.lock();
|
2020-04-17 01:21:49 -05:00
|
|
|
| ^^^^^
|
|
|
|
|
|
2022-02-26 07:26:21 -06: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
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:93:9
|
2020-04-17 01:21:49 -05:00
|
|
|
|
|
2022-02-26 07:26:21 -06:00
|
|
|
LL | / let guard = x.lock();
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2020-04-17 01:21:49 -05:00
|
|
|
LL | | baz().await
|
2022-02-26 07:26:21 -06:00
|
|
|
LL | | }
|
2020-04-17 01:21:49 -05:00
|
|
|
| |_____^
|
|
|
|
|
2022-02-26 07:26:21 -06:00
|
|
|
error: this `MutexGuard` is held across an `await` point
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:109:13
|
2020-04-17 01:21:49 -05:00
|
|
|
|
|
2022-02-26 07:26:21 -06:00
|
|
|
LL | let guard = x.read();
|
2020-04-17 01:21:49 -05:00
|
|
|
| ^^^^^
|
|
|
|
|
|
2022-02-26 07:26:21 -06: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
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:109:9
|
2020-04-17 01:21:49 -05:00
|
|
|
|
|
2022-02-26 07:26:21 -06:00
|
|
|
LL | / let guard = x.read();
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2020-04-17 01:21:49 -05:00
|
|
|
LL | | baz().await
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
2022-02-26 07:26:21 -06:00
|
|
|
error: this `MutexGuard` is held across an `await` point
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:115:13
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
LL | let mut guard = x.write();
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
= 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
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:115:9
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
LL | / let mut guard = x.write();
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-02-26 07:26:21 -06:00
|
|
|
LL | | baz().await
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `MutexGuard` is held across an `await` point
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:137:13
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
LL | let guard = x.lock();
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= 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
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:137:9
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
LL | / let guard = x.lock();
|
|
|
|
LL | |
|
|
|
|
LL | |
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | | let second = baz().await;
|
2022-02-26 07:26:21 -06:00
|
|
|
... |
|
|
|
|
LL | | first + second + third
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
error: this `MutexGuard` is held across an `await` point
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:151:17
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
LL | let guard = x.lock();
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= 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
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:151:13
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
LL | / let guard = x.lock();
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-02-26 07:26:21 -06:00
|
|
|
LL | | baz().await
|
|
|
|
LL | | };
|
|
|
|
| |_________^
|
|
|
|
|
|
|
|
error: this `MutexGuard` is held across an `await` point
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:164:17
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
LL | let guard = x.lock();
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= 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
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:164:13
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
LL | / let guard = x.lock();
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-02-26 07:26:21 -06:00
|
|
|
LL | | baz().await
|
|
|
|
LL | | }
|
|
|
|
| |_________^
|
|
|
|
|
|
|
|
error: this `MutexGuard` is held across an `await` point
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:185:9
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
LL | let mut 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
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/await_holding_lock.rs:185:5
|
2022-02-26 07:26:21 -06:00
|
|
|
|
|
|
|
|
LL | / let mut guard = x.lock().unwrap();
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | |
|
2022-02-26 07:26:21 -06:00
|
|
|
LL | | *guard += 1;
|
|
|
|
LL | | drop(guard);
|
|
|
|
LL | | baz().await;
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
error: aborting due to 13 previous errors
|
2020-04-07 23:20:37 -05:00
|
|
|
|