]> git.lizzy.rs Git - rust.git/blob - tests/ui/await_holding_lock.stderr
Auto merge of #6787 - matthiaskrgr:lint_msgs, r=llogiq
[rust.git] / tests / ui / await_holding_lock.stderr
1 error: this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await
2   --> $DIR/await_holding_lock.rs:7:9
3    |
4 LL |     let guard = x.lock().unwrap();
5    |         ^^^^^
6    |
7    = note: `-D clippy::await-holding-lock` implied by `-D warnings`
8 note: these are all the await points this lock is held through
9   --> $DIR/await_holding_lock.rs:7:5
10    |
11 LL | /     let guard = x.lock().unwrap();
12 LL | |     baz().await
13 LL | | }
14    | |_^
15
16 error: this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await
17   --> $DIR/await_holding_lock.rs:28:9
18    |
19 LL |     let guard = x.lock().unwrap();
20    |         ^^^^^
21    |
22 note: these are all the await points this lock is held through
23   --> $DIR/await_holding_lock.rs:28:5
24    |
25 LL | /     let guard = x.lock().unwrap();
26 LL | |
27 LL | |     let second = baz().await;
28 LL | |
29 ...  |
30 LL | |     first + second + third
31 LL | | }
32    | |_^
33
34 error: this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await
35   --> $DIR/await_holding_lock.rs:41:13
36    |
37 LL |         let guard = x.lock().unwrap();
38    |             ^^^^^
39    |
40 note: these are all the await points this lock is held through
41   --> $DIR/await_holding_lock.rs:41:9
42    |
43 LL | /         let guard = x.lock().unwrap();
44 LL | |         baz().await
45 LL | |     };
46    | |_____^
47
48 error: this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await
49   --> $DIR/await_holding_lock.rs:53:13
50    |
51 LL |         let guard = x.lock().unwrap();
52    |             ^^^^^
53    |
54 note: these are all the await points this lock is held through
55   --> $DIR/await_holding_lock.rs:53:9
56    |
57 LL | /         let guard = x.lock().unwrap();
58 LL | |         baz().await
59 LL | |     }
60    | |_____^
61
62 error: aborting due to 4 previous errors
63