@@ -6,13 +6,10 @@ LL |         let guard = x.lock().unwrap();
66   |
77   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
88note: these are all the `await` points this lock is held through
9-   --> $DIR/await_holding_lock.rs:9:9 
9+   --> $DIR/await_holding_lock.rs:11:15 
1010   |
11- LL | /         let guard = x.lock().unwrap();
12- LL | |
13- LL | |         baz().await
14- LL | |     }
15-    | |_____^
11+ LL |         baz().await
12+    |               ^^^^^
1613   = note: `-D clippy::await-holding-lock` implied by `-D warnings`
1714   = help: to override `-D warnings` add `#[allow(clippy::await_holding_lock)]`
1815
@@ -24,13 +21,10 @@ LL |         let guard = x.read().unwrap();
2421   |
2522   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
2623note: these are all the `await` points this lock is held through
27-   --> $DIR/await_holding_lock.rs:25:9 
24+   --> $DIR/await_holding_lock.rs:27:15 
2825   |
29- LL | /         let guard = x.read().unwrap();
30- LL | |
31- LL | |         baz().await
32- LL | |     }
33-    | |_____^
26+ LL |         baz().await
27+    |               ^^^^^
3428
3529error: this `MutexGuard` is held across an `await` point
3630  --> $DIR/await_holding_lock.rs:31:13
@@ -40,13 +34,10 @@ LL |         let mut guard = x.write().unwrap();
4034   |
4135   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
4236note: these are all the `await` points this lock is held through
43-   --> $DIR/await_holding_lock.rs:31:9 
37+   --> $DIR/await_holding_lock.rs:33:15 
4438   |
45- LL | /         let mut guard = x.write().unwrap();
46- LL | |
47- LL | |         baz().await
48- LL | |     }
49-    | |_____^
39+ LL |         baz().await
40+    |               ^^^^^
5041
5142error: this `MutexGuard` is held across an `await` point
5243  --> $DIR/await_holding_lock.rs:53:13
@@ -56,16 +47,13 @@ LL |         let guard = x.lock().unwrap();
5647   |
5748   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
5849note: these are all the `await` points this lock is held through
59-   --> $DIR/await_holding_lock.rs:53:9
60-    |
61- LL | /         let guard = x.lock().unwrap();
62- LL | |
63- LL | |
64- LL | |         let second = baz().await;
65- ...  |
66- LL | |         first + second + third
67- LL | |     }
68-    | |_____^
50+   --> $DIR/await_holding_lock.rs:56:28
51+    |
52+ LL |         let second = baz().await;
53+    |                            ^^^^^
54+ LL |
55+ LL |         let third = baz().await;
56+    |                           ^^^^^
6957
7058error: this `MutexGuard` is held across an `await` point
7159  --> $DIR/await_holding_lock.rs:67:17
@@ -75,13 +63,10 @@ LL |             let guard = x.lock().unwrap();
7563   |
7664   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
7765note: these are all the `await` points this lock is held through
78-   --> $DIR/await_holding_lock.rs:67:13 
66+   --> $DIR/await_holding_lock.rs:69:19 
7967   |
80- LL | /             let guard = x.lock().unwrap();
81- LL | |
82- LL | |             baz().await
83- LL | |         };
84-    | |_________^
68+ LL |             baz().await
69+    |                   ^^^^^
8570
8671error: this `MutexGuard` is held across an `await` point
8772  --> $DIR/await_holding_lock.rs:80:17
@@ -91,13 +76,10 @@ LL |             let guard = x.lock().unwrap();
9176   |
9277   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
9378note: these are all the `await` points this lock is held through
94-   --> $DIR/await_holding_lock.rs:80:13 
79+   --> $DIR/await_holding_lock.rs:82:19 
9580   |
96- LL | /             let guard = x.lock().unwrap();
97- LL | |
98- LL | |             baz().await
99- LL | |         }
100-    | |_________^
81+ LL |             baz().await
82+    |                   ^^^^^
10183
10284error: this `MutexGuard` is held across an `await` point
10385  --> $DIR/await_holding_lock.rs:93:13
@@ -107,13 +89,10 @@ LL |         let guard = x.lock();
10789   |
10890   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
10991note: these are all the `await` points this lock is held through
110-   --> $DIR/await_holding_lock.rs:93:9 
92+   --> $DIR/await_holding_lock.rs:95:15 
11193   |
112- LL | /         let guard = x.lock();
113- LL | |
114- LL | |         baz().await
115- LL | |     }
116-    | |_____^
94+ LL |         baz().await
95+    |               ^^^^^
11796
11897error: this `MutexGuard` is held across an `await` point
11998  --> $DIR/await_holding_lock.rs:109:13
@@ -123,13 +102,10 @@ LL |         let guard = x.read();
123102   |
124103   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
125104note: these are all the `await` points this lock is held through
126-   --> $DIR/await_holding_lock.rs:109:9 
105+   --> $DIR/await_holding_lock.rs:111:15 
127106   |
128- LL | /         let guard = x.read();
129- LL | |
130- LL | |         baz().await
131- LL | |     }
132-    | |_____^
107+ LL |         baz().await
108+    |               ^^^^^
133109
134110error: this `MutexGuard` is held across an `await` point
135111  --> $DIR/await_holding_lock.rs:115:13
@@ -139,13 +115,10 @@ LL |         let mut guard = x.write();
139115   |
140116   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
141117note: these are all the `await` points this lock is held through
142-   --> $DIR/await_holding_lock.rs:115:9 
118+   --> $DIR/await_holding_lock.rs:117:15 
143119   |
144- LL | /         let mut guard = x.write();
145- LL | |
146- LL | |         baz().await
147- LL | |     }
148-    | |_____^
120+ LL |         baz().await
121+    |               ^^^^^
149122
150123error: this `MutexGuard` is held across an `await` point
151124  --> $DIR/await_holding_lock.rs:137:13
@@ -155,16 +128,13 @@ LL |         let guard = x.lock();
155128   |
156129   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
157130note: these are all the `await` points this lock is held through
158-   --> $DIR/await_holding_lock.rs:137:9
159-    |
160- LL | /         let guard = x.lock();
161- LL | |
162- LL | |
163- LL | |         let second = baz().await;
164- ...  |
165- LL | |         first + second + third
166- LL | |     }
167-    | |_____^
131+   --> $DIR/await_holding_lock.rs:140:28
132+    |
133+ LL |         let second = baz().await;
134+    |                            ^^^^^
135+ LL |
136+ LL |         let third = baz().await;
137+    |                           ^^^^^
168138
169139error: this `MutexGuard` is held across an `await` point
170140  --> $DIR/await_holding_lock.rs:151:17
@@ -174,13 +144,10 @@ LL |             let guard = x.lock();
174144   |
175145   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
176146note: these are all the `await` points this lock is held through
177-   --> $DIR/await_holding_lock.rs:151:13 
147+   --> $DIR/await_holding_lock.rs:153:19 
178148   |
179- LL | /             let guard = x.lock();
180- LL | |
181- LL | |             baz().await
182- LL | |         };
183-    | |_________^
149+ LL |             baz().await
150+    |                   ^^^^^
184151
185152error: this `MutexGuard` is held across an `await` point
186153  --> $DIR/await_holding_lock.rs:164:17
@@ -190,13 +157,10 @@ LL |             let guard = x.lock();
190157   |
191158   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
192159note: these are all the `await` points this lock is held through
193-   --> $DIR/await_holding_lock.rs:164:13 
160+   --> $DIR/await_holding_lock.rs:166:19 
194161   |
195- LL | /             let guard = x.lock();
196- LL | |
197- LL | |             baz().await
198- LL | |         }
199-    | |_________^
162+ LL |             baz().await
163+    |                   ^^^^^
200164
201165error: this `MutexGuard` is held across an `await` point
202166  --> $DIR/await_holding_lock.rs:185:9
@@ -206,15 +170,10 @@ LL |     let mut guard = x.lock().unwrap();
206170   |
207171   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
208172note: these are all the `await` points this lock is held through
209-   --> $DIR/await_holding_lock.rs:185:5
210-    |
211- LL | /     let mut guard = x.lock().unwrap();
212- LL | |
213- LL | |     *guard += 1;
214- LL | |     drop(guard);
215- LL | |     baz().await;
216- LL | | }
217-    | |_^
173+   --> $DIR/await_holding_lock.rs:189:11
174+    |
175+ LL |     baz().await;
176+    |           ^^^^^
218177
219178error: aborting due to 13 previous errors
220179
0 commit comments