]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/await_holding_lock.stderr
Auto merge of #101969 - reez12g:issue-101306, r=reez12g
[rust.git] / src / tools / clippy / tests / ui / await_holding_lock.stderr
1 error: this `MutexGuard` is held across an `await` point
2   --> $DIR/await_holding_lock.rs:9:13
3    |
4 LL |         let guard = x.lock().unwrap();
5    |             ^^^^^
6    |
7    = note: `-D clippy::await-holding-lock` implied by `-D warnings`
8    = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
9 note: these are all the `await` points this lock is held through
10   --> $DIR/await_holding_lock.rs:9:9
11    |
12 LL | /         let guard = x.lock().unwrap();
13 LL | |         baz().await
14 LL | |     }
15    | |_____^
16
17 error: this `MutexGuard` is held across an `await` point
18   --> $DIR/await_holding_lock.rs:24:13
19    |
20 LL |         let guard = x.read().unwrap();
21    |             ^^^^^
22    |
23    = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
24 note: these are all the `await` points this lock is held through
25   --> $DIR/await_holding_lock.rs:24:9
26    |
27 LL | /         let guard = x.read().unwrap();
28 LL | |         baz().await
29 LL | |     }
30    | |_____^
31
32 error: this `MutexGuard` is held across an `await` point
33   --> $DIR/await_holding_lock.rs:29:13
34    |
35 LL |         let mut guard = x.write().unwrap();
36    |             ^^^^^^^^^
37    |
38    = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
39 note: these are all the `await` points this lock is held through
40   --> $DIR/await_holding_lock.rs:29:9
41    |
42 LL | /         let mut guard = x.write().unwrap();
43 LL | |         baz().await
44 LL | |     }
45    | |_____^
46
47 error: this `MutexGuard` is held across an `await` point
48   --> $DIR/await_holding_lock.rs:50:13
49    |
50 LL |         let guard = x.lock().unwrap();
51    |             ^^^^^
52    |
53    = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
54 note: these are all the `await` points this lock is held through
55   --> $DIR/await_holding_lock.rs:50:9
56    |
57 LL | /         let guard = x.lock().unwrap();
58 LL | |
59 LL | |         let second = baz().await;
60 LL | |
61 ...  |
62 LL | |         first + second + third
63 LL | |     }
64    | |_____^
65
66 error: this `MutexGuard` is held across an `await` point
67   --> $DIR/await_holding_lock.rs:63:17
68    |
69 LL |             let guard = x.lock().unwrap();
70    |                 ^^^^^
71    |
72    = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
73 note: these are all the `await` points this lock is held through
74   --> $DIR/await_holding_lock.rs:63:13
75    |
76 LL | /             let guard = x.lock().unwrap();
77 LL | |             baz().await
78 LL | |         };
79    | |_________^
80
81 error: this `MutexGuard` is held across an `await` point
82   --> $DIR/await_holding_lock.rs:75:17
83    |
84 LL |             let guard = x.lock().unwrap();
85    |                 ^^^^^
86    |
87    = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
88 note: these are all the `await` points this lock is held through
89   --> $DIR/await_holding_lock.rs:75:13
90    |
91 LL | /             let guard = x.lock().unwrap();
92 LL | |             baz().await
93 LL | |         }
94    | |_________^
95
96 error: this `MutexGuard` is held across an `await` point
97   --> $DIR/await_holding_lock.rs:87:13
98    |
99 LL |         let guard = x.lock();
100    |             ^^^^^
101    |
102    = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
103 note: these are all the `await` points this lock is held through
104   --> $DIR/await_holding_lock.rs:87:9
105    |
106 LL | /         let guard = x.lock();
107 LL | |         baz().await
108 LL | |     }
109    | |_____^
110
111 error: this `MutexGuard` is held across an `await` point
112   --> $DIR/await_holding_lock.rs:102:13
113    |
114 LL |         let guard = x.read();
115    |             ^^^^^
116    |
117    = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
118 note: these are all the `await` points this lock is held through
119   --> $DIR/await_holding_lock.rs:102:9
120    |
121 LL | /         let guard = x.read();
122 LL | |         baz().await
123 LL | |     }
124    | |_____^
125
126 error: this `MutexGuard` is held across an `await` point
127   --> $DIR/await_holding_lock.rs:107:13
128    |
129 LL |         let mut guard = x.write();
130    |             ^^^^^^^^^
131    |
132    = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
133 note: these are all the `await` points this lock is held through
134   --> $DIR/await_holding_lock.rs:107:9
135    |
136 LL | /         let mut guard = x.write();
137 LL | |         baz().await
138 LL | |     }
139    | |_____^
140
141 error: this `MutexGuard` is held across an `await` point
142   --> $DIR/await_holding_lock.rs:128:13
143    |
144 LL |         let guard = x.lock();
145    |             ^^^^^
146    |
147    = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
148 note: these are all the `await` points this lock is held through
149   --> $DIR/await_holding_lock.rs:128:9
150    |
151 LL | /         let guard = x.lock();
152 LL | |
153 LL | |         let second = baz().await;
154 LL | |
155 ...  |
156 LL | |         first + second + third
157 LL | |     }
158    | |_____^
159
160 error: this `MutexGuard` is held across an `await` point
161   --> $DIR/await_holding_lock.rs:141:17
162    |
163 LL |             let guard = x.lock();
164    |                 ^^^^^
165    |
166    = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
167 note: these are all the `await` points this lock is held through
168   --> $DIR/await_holding_lock.rs:141:13
169    |
170 LL | /             let guard = x.lock();
171 LL | |             baz().await
172 LL | |         };
173    | |_________^
174
175 error: this `MutexGuard` is held across an `await` point
176   --> $DIR/await_holding_lock.rs:153:17
177    |
178 LL |             let guard = x.lock();
179    |                 ^^^^^
180    |
181    = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
182 note: these are all the `await` points this lock is held through
183   --> $DIR/await_holding_lock.rs:153:13
184    |
185 LL | /             let guard = x.lock();
186 LL | |             baz().await
187 LL | |         }
188    | |_________^
189
190 error: this `MutexGuard` is held across an `await` point
191   --> $DIR/await_holding_lock.rs:173:9
192    |
193 LL |     let mut guard = x.lock().unwrap();
194    |         ^^^^^^^^^
195    |
196    = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
197 note: these are all the `await` points this lock is held through
198   --> $DIR/await_holding_lock.rs:173:5
199    |
200 LL | /     let mut guard = x.lock().unwrap();
201 LL | |     *guard += 1;
202 LL | |     drop(guard);
203 LL | |     baz().await;
204 LL | | }
205    | |_^
206
207 error: aborting due to 13 previous errors
208