@@ -6,13 +6,10 @@ LL | let guard = x.lock().unwrap();
6
6
|
7
7
= help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
8
8
note: 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
10
10
|
11
- LL | / let guard = x.lock().unwrap();
12
- LL | |
13
- LL | | baz().await
14
- LL | | }
15
- | |_____^
11
+ LL | baz().await
12
+ | ^^^^^
16
13
= note: `-D clippy::await-holding-lock` implied by `-D warnings`
17
14
= help: to override `-D warnings` add `#[allow(clippy::await_holding_lock)]`
18
15
@@ -24,13 +21,10 @@ LL | let guard = x.read().unwrap();
24
21
|
25
22
= help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
26
23
note: 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
28
25
|
29
- LL | / let guard = x.read().unwrap();
30
- LL | |
31
- LL | | baz().await
32
- LL | | }
33
- | |_____^
26
+ LL | baz().await
27
+ | ^^^^^
34
28
35
29
error: this `MutexGuard` is held across an `await` point
36
30
--> $DIR/await_holding_lock.rs:31:13
@@ -40,13 +34,10 @@ LL | let mut guard = x.write().unwrap();
40
34
|
41
35
= help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
42
36
note: 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
44
38
|
45
- LL | / let mut guard = x.write().unwrap();
46
- LL | |
47
- LL | | baz().await
48
- LL | | }
49
- | |_____^
39
+ LL | baz().await
40
+ | ^^^^^
50
41
51
42
error: this `MutexGuard` is held across an `await` point
52
43
--> $DIR/await_holding_lock.rs:53:13
@@ -56,16 +47,13 @@ LL | let guard = x.lock().unwrap();
56
47
|
57
48
= help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
58
49
note: 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
+ | ^^^^^
69
57
70
58
error: this `MutexGuard` is held across an `await` point
71
59
--> $DIR/await_holding_lock.rs:67:17
@@ -75,13 +63,10 @@ LL | let guard = x.lock().unwrap();
75
63
|
76
64
= help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
77
65
note: 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
79
67
|
80
- LL | / let guard = x.lock().unwrap();
81
- LL | |
82
- LL | | baz().await
83
- LL | | };
84
- | |_________^
68
+ LL | baz().await
69
+ | ^^^^^
85
70
86
71
error: this `MutexGuard` is held across an `await` point
87
72
--> $DIR/await_holding_lock.rs:80:17
@@ -91,13 +76,10 @@ LL | let guard = x.lock().unwrap();
91
76
|
92
77
= help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
93
78
note: 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
95
80
|
96
- LL | / let guard = x.lock().unwrap();
97
- LL | |
98
- LL | | baz().await
99
- LL | | }
100
- | |_________^
81
+ LL | baz().await
82
+ | ^^^^^
101
83
102
84
error: this `MutexGuard` is held across an `await` point
103
85
--> $DIR/await_holding_lock.rs:93:13
@@ -107,13 +89,10 @@ LL | let guard = x.lock();
107
89
|
108
90
= help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
109
91
note: 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
111
93
|
112
- LL | / let guard = x.lock();
113
- LL | |
114
- LL | | baz().await
115
- LL | | }
116
- | |_____^
94
+ LL | baz().await
95
+ | ^^^^^
117
96
118
97
error: this `MutexGuard` is held across an `await` point
119
98
--> $DIR/await_holding_lock.rs:109:13
@@ -123,13 +102,10 @@ LL | let guard = x.read();
123
102
|
124
103
= help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
125
104
note: 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
127
106
|
128
- LL | / let guard = x.read();
129
- LL | |
130
- LL | | baz().await
131
- LL | | }
132
- | |_____^
107
+ LL | baz().await
108
+ | ^^^^^
133
109
134
110
error: this `MutexGuard` is held across an `await` point
135
111
--> $DIR/await_holding_lock.rs:115:13
@@ -139,13 +115,10 @@ LL | let mut guard = x.write();
139
115
|
140
116
= help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
141
117
note: 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
143
119
|
144
- LL | / let mut guard = x.write();
145
- LL | |
146
- LL | | baz().await
147
- LL | | }
148
- | |_____^
120
+ LL | baz().await
121
+ | ^^^^^
149
122
150
123
error: this `MutexGuard` is held across an `await` point
151
124
--> $DIR/await_holding_lock.rs:137:13
@@ -155,16 +128,13 @@ LL | let guard = x.lock();
155
128
|
156
129
= help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
157
130
note: 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
+ | ^^^^^
168
138
169
139
error: this `MutexGuard` is held across an `await` point
170
140
--> $DIR/await_holding_lock.rs:151:17
@@ -174,13 +144,10 @@ LL | let guard = x.lock();
174
144
|
175
145
= help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
176
146
note: 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
178
148
|
179
- LL | / let guard = x.lock();
180
- LL | |
181
- LL | | baz().await
182
- LL | | };
183
- | |_________^
149
+ LL | baz().await
150
+ | ^^^^^
184
151
185
152
error: this `MutexGuard` is held across an `await` point
186
153
--> $DIR/await_holding_lock.rs:164:17
@@ -190,13 +157,10 @@ LL | let guard = x.lock();
190
157
|
191
158
= help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
192
159
note: 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
194
161
|
195
- LL | / let guard = x.lock();
196
- LL | |
197
- LL | | baz().await
198
- LL | | }
199
- | |_________^
162
+ LL | baz().await
163
+ | ^^^^^
200
164
201
165
error: this `MutexGuard` is held across an `await` point
202
166
--> $DIR/await_holding_lock.rs:185:9
@@ -206,15 +170,10 @@ LL | let mut guard = x.lock().unwrap();
206
170
|
207
171
= help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
208
172
note: 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
+ | ^^^^^
218
177
219
178
error: aborting due to 13 previous errors
220
179
0 commit comments