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