11error: this `MutexGuard` is held across an `await` point
2- --> $DIR/await_holding_lock.rs:10 :13
2+ --> $DIR/await_holding_lock.rs:11 :13
33 |
44LL | let guard = x.lock().unwrap();
55 | ^^^^^
66 |
77 = note: `-D clippy::await-holding-lock` implied by `-D warnings`
88 = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
99note: these are all the `await` points this lock is held through
10- --> $DIR/await_holding_lock.rs:10 :9
10+ --> $DIR/await_holding_lock.rs:11 :9
1111 |
1212LL | / let guard = x.lock().unwrap();
1313LL | | baz().await
1414LL | | }
1515 | |_____^
1616
1717error: this `MutexGuard` is held across an `await` point
18- --> $DIR/await_holding_lock.rs:25 :13
18+ --> $DIR/await_holding_lock.rs:26 :13
1919 |
2020LL | let guard = x.read().unwrap();
2121 | ^^^^^
2222 |
2323 = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
2424note: these are all the `await` points this lock is held through
25- --> $DIR/await_holding_lock.rs:25 :9
25+ --> $DIR/await_holding_lock.rs:26 :9
2626 |
2727LL | / let guard = x.read().unwrap();
2828LL | | baz().await
2929LL | | }
3030 | |_____^
3131
3232error: this `MutexGuard` is held across an `await` point
33- --> $DIR/await_holding_lock.rs:30 :13
33+ --> $DIR/await_holding_lock.rs:31 :13
3434 |
3535LL | let mut guard = x.write().unwrap();
3636 | ^^^^^^^^^
3737 |
3838 = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
3939note: these are all the `await` points this lock is held through
40- --> $DIR/await_holding_lock.rs:30 :9
40+ --> $DIR/await_holding_lock.rs:31 :9
4141 |
4242LL | / let mut guard = x.write().unwrap();
4343LL | | baz().await
4444LL | | }
4545 | |_____^
4646
4747error: this `MutexGuard` is held across an `await` point
48- --> $DIR/await_holding_lock.rs:55 :13
48+ --> $DIR/await_holding_lock.rs:52 :13
4949 |
5050LL | let guard = x.lock().unwrap();
5151 | ^^^^^
5252 |
5353 = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
5454note: these are all the `await` points this lock is held through
55- --> $DIR/await_holding_lock.rs:55 :9
55+ --> $DIR/await_holding_lock.rs:52 :9
5656 |
5757LL | / let guard = x.lock().unwrap();
5858LL | |
@@ -64,89 +64,89 @@ LL | | }
6464 | |_____^
6565
6666error: this `MutexGuard` is held across an `await` point
67- --> $DIR/await_holding_lock.rs:68 :17
67+ --> $DIR/await_holding_lock.rs:65 :17
6868 |
6969LL | let guard = x.lock().unwrap();
7070 | ^^^^^
7171 |
7272 = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
7373note: these are all the `await` points this lock is held through
74- --> $DIR/await_holding_lock.rs:68 :13
74+ --> $DIR/await_holding_lock.rs:65 :13
7575 |
7676LL | / let guard = x.lock().unwrap();
7777LL | | baz().await
7878LL | | };
7979 | |_________^
8080
8181error: this `MutexGuard` is held across an `await` point
82- --> $DIR/await_holding_lock.rs:80 :17
82+ --> $DIR/await_holding_lock.rs:77 :17
8383 |
8484LL | let guard = x.lock().unwrap();
8585 | ^^^^^
8686 |
8787 = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
8888note: these are all the `await` points this lock is held through
89- --> $DIR/await_holding_lock.rs:80 :13
89+ --> $DIR/await_holding_lock.rs:77 :13
9090 |
9191LL | / let guard = x.lock().unwrap();
9292LL | | baz().await
9393LL | | }
9494 | |_________^
9595
9696error: this `MutexGuard` is held across an `await` point
97- --> $DIR/await_holding_lock.rs:91 :13
97+ --> $DIR/await_holding_lock.rs:89 :13
9898 |
9999LL | let guard = x.lock();
100100 | ^^^^^
101101 |
102102 = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
103103note: these are all the `await` points this lock is held through
104- --> $DIR/await_holding_lock.rs:91 :9
104+ --> $DIR/await_holding_lock.rs:89 :9
105105 |
106106LL | / let guard = x.lock();
107107LL | | baz().await
108108LL | | }
109109 | |_____^
110110
111111error: this `MutexGuard` is held across an `await` point
112- --> $DIR/await_holding_lock.rs:106 :13
112+ --> $DIR/await_holding_lock.rs:104 :13
113113 |
114114LL | let guard = x.read();
115115 | ^^^^^
116116 |
117117 = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
118118note: these are all the `await` points this lock is held through
119- --> $DIR/await_holding_lock.rs:106 :9
119+ --> $DIR/await_holding_lock.rs:104 :9
120120 |
121121LL | / let guard = x.read();
122122LL | | baz().await
123123LL | | }
124124 | |_____^
125125
126126error: this `MutexGuard` is held across an `await` point
127- --> $DIR/await_holding_lock.rs:111 :13
127+ --> $DIR/await_holding_lock.rs:109 :13
128128 |
129129LL | let mut guard = x.write();
130130 | ^^^^^^^^^
131131 |
132132 = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
133133note: these are all the `await` points this lock is held through
134- --> $DIR/await_holding_lock.rs:111 :9
134+ --> $DIR/await_holding_lock.rs:109 :9
135135 |
136136LL | / let mut guard = x.write();
137137LL | | baz().await
138138LL | | }
139139 | |_____^
140140
141141error: this `MutexGuard` is held across an `await` point
142- --> $DIR/await_holding_lock.rs:136 :13
142+ --> $DIR/await_holding_lock.rs:130 :13
143143 |
144144LL | let guard = x.lock();
145145 | ^^^^^
146146 |
147147 = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
148148note: these are all the `await` points this lock is held through
149- --> $DIR/await_holding_lock.rs:136 :9
149+ --> $DIR/await_holding_lock.rs:130 :9
150150 |
151151LL | / let guard = x.lock();
152152LL | |
@@ -158,34 +158,51 @@ LL | | }
158158 | |_____^
159159
160160error: this `MutexGuard` is held across an `await` point
161- --> $DIR/await_holding_lock.rs:149 :17
161+ --> $DIR/await_holding_lock.rs:143 :17
162162 |
163163LL | let guard = x.lock();
164164 | ^^^^^
165165 |
166166 = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
167167note: these are all the `await` points this lock is held through
168- --> $DIR/await_holding_lock.rs:149 :13
168+ --> $DIR/await_holding_lock.rs:143 :13
169169 |
170170LL | / let guard = x.lock();
171171LL | | baz().await
172172LL | | };
173173 | |_________^
174174
175175error: this `MutexGuard` is held across an `await` point
176- --> $DIR/await_holding_lock.rs:161 :17
176+ --> $DIR/await_holding_lock.rs:155 :17
177177 |
178178LL | let guard = x.lock();
179179 | ^^^^^
180180 |
181181 = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
182182note: these are all the `await` points this lock is held through
183- --> $DIR/await_holding_lock.rs:161 :13
183+ --> $DIR/await_holding_lock.rs:155 :13
184184 |
185185LL | / let guard = x.lock();
186186LL | | baz().await
187187LL | | }
188188 | |_________^
189189
190- error: aborting due to 12 previous errors
190+ error: this `MutexGuard` is held across an `await` point
191+ --> $DIR/await_holding_lock.rs:175: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:175: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
191208
0 commit comments