1
1
error[E0499]: cannot borrow `x` as mutable more than once at a time
2
- --> $DIR/borrowck-describe-lvalue.rs:256 :13
2
+ --> $DIR/borrowck-describe-lvalue.rs:254 :13
3
3
|
4
4
LL | let y = &mut x;
5
5
| ------ first mutable borrow occurs here
@@ -9,7 +9,7 @@ LL | *y = 1;
9
9
| ------ first borrow later used here
10
10
11
11
error[E0499]: cannot borrow `x` as mutable more than once at a time
12
- --> $DIR/borrowck-describe-lvalue.rs:266 :20
12
+ --> $DIR/borrowck-describe-lvalue.rs:264 :20
13
13
|
14
14
LL | let y = &mut x;
15
15
| ------ first mutable borrow occurs here
@@ -19,7 +19,7 @@ LL | *y = 1;
19
19
| ------ first borrow later used here
20
20
21
21
error: captured variable cannot escape `FnMut` closure body
22
- --> $DIR/borrowck-describe-lvalue.rs:264 :16
22
+ --> $DIR/borrowck-describe-lvalue.rs:262 :16
23
23
|
24
24
LL | let mut x = 0;
25
25
| ----- variable defined here
@@ -38,7 +38,7 @@ LL | | }
38
38
= note: ...therefore, they cannot allow references to captured variables to escape
39
39
40
40
error[E0503]: cannot use `f.x` because it was mutably borrowed
41
- --> $DIR/borrowck-describe-lvalue.rs:39 :9
41
+ --> $DIR/borrowck-describe-lvalue.rs:37 :9
42
42
|
43
43
LL | let x = f.x();
44
44
| - borrow of `f` occurs here
@@ -48,7 +48,7 @@ LL | drop(x);
48
48
| - borrow later used here
49
49
50
50
error[E0503]: cannot use `g.0` because it was mutably borrowed
51
- --> $DIR/borrowck-describe-lvalue.rs:46 :9
51
+ --> $DIR/borrowck-describe-lvalue.rs:44 :9
52
52
|
53
53
LL | let x = g.x();
54
54
| - borrow of `g` occurs here
@@ -58,7 +58,7 @@ LL | drop(x);
58
58
| - borrow later used here
59
59
60
60
error[E0503]: cannot use `h.0` because it was mutably borrowed
61
- --> $DIR/borrowck-describe-lvalue.rs:53 :9
61
+ --> $DIR/borrowck-describe-lvalue.rs:51 :9
62
62
|
63
63
LL | let x = &mut h.0;
64
64
| -------- borrow of `h.0` occurs here
@@ -68,7 +68,7 @@ LL | drop(x);
68
68
| - borrow later used here
69
69
70
70
error[E0503]: cannot use `e.0` because it was mutably borrowed
71
- --> $DIR/borrowck-describe-lvalue.rs:61 :20
71
+ --> $DIR/borrowck-describe-lvalue.rs:59 :20
72
72
|
73
73
LL | let x = e.x();
74
74
| - borrow of `e` occurs here
@@ -80,7 +80,7 @@ LL | drop(x);
80
80
| - borrow later used here
81
81
82
82
error[E0503]: cannot use `u.a` because it was mutably borrowed
83
- --> $DIR/borrowck-describe-lvalue.rs:69 :9
83
+ --> $DIR/borrowck-describe-lvalue.rs:67 :9
84
84
|
85
85
LL | let x = &mut u.a;
86
86
| -------- borrow of `u.a` occurs here
@@ -90,7 +90,7 @@ LL | drop(x);
90
90
| - borrow later used here
91
91
92
92
error[E0503]: cannot use `f.x` because it was mutably borrowed
93
- --> $DIR/borrowck-describe-lvalue.rs:76 :9
93
+ --> $DIR/borrowck-describe-lvalue.rs:74 :9
94
94
|
95
95
LL | let x = f.x();
96
96
| - borrow of `*f` occurs here
@@ -100,7 +100,7 @@ LL | drop(x);
100
100
| - borrow later used here
101
101
102
102
error[E0503]: cannot use `g.0` because it was mutably borrowed
103
- --> $DIR/borrowck-describe-lvalue.rs:83 :9
103
+ --> $DIR/borrowck-describe-lvalue.rs:81 :9
104
104
|
105
105
LL | let x = g.x();
106
106
| - borrow of `*g` occurs here
@@ -110,7 +110,7 @@ LL | drop(x);
110
110
| - borrow later used here
111
111
112
112
error[E0503]: cannot use `h.0` because it was mutably borrowed
113
- --> $DIR/borrowck-describe-lvalue.rs:90 :9
113
+ --> $DIR/borrowck-describe-lvalue.rs:88 :9
114
114
|
115
115
LL | let x = &mut h.0;
116
116
| -------- borrow of `h.0` occurs here
@@ -120,7 +120,7 @@ LL | drop(x);
120
120
| - borrow later used here
121
121
122
122
error[E0503]: cannot use `e.0` because it was mutably borrowed
123
- --> $DIR/borrowck-describe-lvalue.rs:98 :20
123
+ --> $DIR/borrowck-describe-lvalue.rs:96 :20
124
124
|
125
125
LL | let x = e.x();
126
126
| - borrow of `*e` occurs here
@@ -132,7 +132,7 @@ LL | drop(x);
132
132
| - borrow later used here
133
133
134
134
error[E0503]: cannot use `u.a` because it was mutably borrowed
135
- --> $DIR/borrowck-describe-lvalue.rs:107 :9
135
+ --> $DIR/borrowck-describe-lvalue.rs:105 :9
136
136
|
137
137
LL | let x = &mut u.a;
138
138
| -------- borrow of `u.a` occurs here
@@ -142,7 +142,7 @@ LL | drop(x);
142
142
| - borrow later used here
143
143
144
144
error[E0503]: cannot use `v[..]` because it was mutably borrowed
145
- --> $DIR/borrowck-describe-lvalue.rs:115 :15
145
+ --> $DIR/borrowck-describe-lvalue.rs:113 :15
146
146
|
147
147
LL | let x = &mut v;
148
148
| ------ borrow of `v` occurs here
@@ -154,7 +154,7 @@ LL | drop(x);
154
154
| - borrow later used here
155
155
156
156
error[E0503]: cannot use `v[..]` because it was mutably borrowed
157
- --> $DIR/borrowck-describe-lvalue.rs:120 :18
157
+ --> $DIR/borrowck-describe-lvalue.rs:118 :18
158
158
|
159
159
LL | let x = &mut v;
160
160
| ------ borrow of `v` occurs here
@@ -166,7 +166,7 @@ LL | drop(x);
166
166
| - borrow later used here
167
167
168
168
error[E0503]: cannot use `v[..]` because it was mutably borrowed
169
- --> $DIR/borrowck-describe-lvalue.rs:125 :25
169
+ --> $DIR/borrowck-describe-lvalue.rs:123 :25
170
170
|
171
171
LL | let x = &mut v;
172
172
| ------ borrow of `v` occurs here
@@ -178,7 +178,7 @@ LL | drop(x);
178
178
| - borrow later used here
179
179
180
180
error[E0503]: cannot use `v[..]` because it was mutably borrowed
181
- --> $DIR/borrowck-describe-lvalue.rs:130 :28
181
+ --> $DIR/borrowck-describe-lvalue.rs:128 :28
182
182
|
183
183
LL | let x = &mut v;
184
184
| ------ borrow of `v` occurs here
@@ -190,7 +190,7 @@ LL | drop(x);
190
190
| - borrow later used here
191
191
192
192
error[E0503]: cannot use `v[..]` because it was mutably borrowed
193
- --> $DIR/borrowck-describe-lvalue.rs:141 :15
193
+ --> $DIR/borrowck-describe-lvalue.rs:139 :15
194
194
|
195
195
LL | let x = &mut v;
196
196
| ------ borrow of `v` occurs here
@@ -202,7 +202,7 @@ LL | drop(x);
202
202
| - borrow later used here
203
203
204
204
error[E0503]: cannot use `v[..]` because it was mutably borrowed
205
- --> $DIR/borrowck-describe-lvalue.rs:146 :18
205
+ --> $DIR/borrowck-describe-lvalue.rs:144 :18
206
206
|
207
207
LL | let x = &mut v;
208
208
| ------ borrow of `v` occurs here
@@ -214,7 +214,7 @@ LL | drop(x);
214
214
| - borrow later used here
215
215
216
216
error[E0503]: cannot use `v[..]` because it was mutably borrowed
217
- --> $DIR/borrowck-describe-lvalue.rs:151 :15
217
+ --> $DIR/borrowck-describe-lvalue.rs:149 :15
218
218
|
219
219
LL | let x = &mut v;
220
220
| ------ borrow of `v` occurs here
@@ -226,7 +226,7 @@ LL | drop(x);
226
226
| - borrow later used here
227
227
228
228
error[E0503]: cannot use `v[..]` because it was mutably borrowed
229
- --> $DIR/borrowck-describe-lvalue.rs:156 :18
229
+ --> $DIR/borrowck-describe-lvalue.rs:154 :18
230
230
|
231
231
LL | let x = &mut v;
232
232
| ------ borrow of `v` occurs here
@@ -238,7 +238,7 @@ LL | drop(x);
238
238
| - borrow later used here
239
239
240
240
error[E0503]: cannot use `e` because it was mutably borrowed
241
- --> $DIR/borrowck-describe-lvalue.rs:169 :13
241
+ --> $DIR/borrowck-describe-lvalue.rs:167 :13
242
242
|
243
243
LL | let x = &mut e;
244
244
| ------ borrow of `e` occurs here
@@ -250,7 +250,7 @@ LL | drop(x);
250
250
| - borrow later used here
251
251
252
252
error[E0502]: cannot borrow `e.0` as immutable because it is also borrowed as mutable
253
- --> $DIR/borrowck-describe-lvalue.rs:169 :18
253
+ --> $DIR/borrowck-describe-lvalue.rs:167 :18
254
254
|
255
255
LL | let x = &mut e;
256
256
| ------ mutable borrow occurs here
@@ -262,7 +262,7 @@ LL | drop(x);
262
262
| - mutable borrow later used here
263
263
264
264
error[E0502]: cannot borrow `e.x` as immutable because it is also borrowed as mutable
265
- --> $DIR/borrowck-describe-lvalue.rs:173 :23
265
+ --> $DIR/borrowck-describe-lvalue.rs:171 :23
266
266
|
267
267
LL | let x = &mut e;
268
268
| ------ mutable borrow occurs here
@@ -274,7 +274,7 @@ LL | drop(x);
274
274
| - mutable borrow later used here
275
275
276
276
error[E0502]: cannot borrow `s.y.0` as immutable because it is also borrowed as mutable
277
- --> $DIR/borrowck-describe-lvalue.rs:186 :22
277
+ --> $DIR/borrowck-describe-lvalue.rs:184 :22
278
278
|
279
279
LL | let x = &mut s;
280
280
| ------ mutable borrow occurs here
@@ -286,7 +286,7 @@ LL | drop(x);
286
286
| - mutable borrow later used here
287
287
288
288
error[E0502]: cannot borrow `s.x.y` as immutable because it is also borrowed as mutable
289
- --> $DIR/borrowck-describe-lvalue.rs:192 :28
289
+ --> $DIR/borrowck-describe-lvalue.rs:190 :28
290
290
|
291
291
LL | let x = &mut s;
292
292
| ------ mutable borrow occurs here
@@ -298,7 +298,7 @@ LL | drop(x);
298
298
| - mutable borrow later used here
299
299
300
300
error[E0503]: cannot use `*v` because it was mutably borrowed
301
- --> $DIR/borrowck-describe-lvalue.rs:234 :9
301
+ --> $DIR/borrowck-describe-lvalue.rs:232 :9
302
302
|
303
303
LL | let x = &mut v;
304
304
| ------ borrow of `v` occurs here
@@ -309,7 +309,7 @@ LL | drop(x);
309
309
| - borrow later used here
310
310
311
311
error[E0503]: cannot use `v[_].y` because it was mutably borrowed
312
- --> $DIR/borrowck-describe-lvalue.rs:234 :9
312
+ --> $DIR/borrowck-describe-lvalue.rs:232 :9
313
313
|
314
314
LL | let x = &mut v;
315
315
| ------ borrow of `v` occurs here
@@ -320,7 +320,7 @@ LL | drop(x);
320
320
| - borrow later used here
321
321
322
322
error[E0502]: cannot borrow `v[..].x` as immutable because it is also borrowed as mutable
323
- --> $DIR/borrowck-describe-lvalue.rs:245 :24
323
+ --> $DIR/borrowck-describe-lvalue.rs:243 :24
324
324
|
325
325
LL | let x = &mut v;
326
326
| ------ mutable borrow occurs here
@@ -332,7 +332,7 @@ LL | drop(x);
332
332
| - mutable borrow later used here
333
333
334
334
error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable
335
- --> $DIR/borrowck-describe-lvalue.rs:208 :29
335
+ --> $DIR/borrowck-describe-lvalue.rs:206 :29
336
336
|
337
337
LL | let x = &mut block;
338
338
| ---------- mutable borrow occurs here
@@ -343,7 +343,7 @@ LL | drop(x);
343
343
| - mutable borrow later used here
344
344
345
345
error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable
346
- --> $DIR/borrowck-describe-lvalue.rs:223 :33
346
+ --> $DIR/borrowck-describe-lvalue.rs:221 :33
347
347
|
348
348
LL | let x = &mut block;
349
349
| ---------- mutable borrow occurs here
@@ -354,7 +354,7 @@ LL | drop(x);
354
354
| - mutable borrow later used here
355
355
356
356
error[E0382]: use of moved value: `x`
357
- --> $DIR/borrowck-describe-lvalue.rs:276 :22
357
+ --> $DIR/borrowck-describe-lvalue.rs:274 :22
358
358
|
359
359
LL | drop(x);
360
360
| - value moved here
0 commit comments