1 error[E0499]: cannot borrow `x` as mutable more than once at a time
2 --> $DIR/borrowck-describe-lvalue.rs:254:13
5 | ------ first mutable borrow occurs here
7 | ^^^^^^ second mutable borrow occurs here
9 | ------ first borrow later used here
11 error[E0499]: cannot borrow `x` as mutable more than once at a time
12 --> $DIR/borrowck-describe-lvalue.rs:264:20
15 | ------ first mutable borrow occurs here
17 | ^^^^^^ second mutable borrow occurs here
19 | ------ first borrow later used here
21 error: captured variable cannot escape `FnMut` closure body
22 --> $DIR/borrowck-describe-lvalue.rs:262:16
25 | ----- variable defined here
27 | - inferred to be a `FnMut` closure
29 LL | | let y = &mut x;
30 | | - variable captured here
35 | |_________________^ returns a closure that contains a reference to a captured variable, which then escapes the closure body
37 = note: `FnMut` closures only have access to their captured variables while they are executing...
38 = note: ...therefore, they cannot allow references to captured variables to escape
40 error[E0503]: cannot use `f.x` because it was mutably borrowed
41 --> $DIR/borrowck-describe-lvalue.rs:37:9
44 | - borrow of `f` occurs here
46 | ^^^ use of borrowed `f`
48 | - borrow later used here
50 error[E0503]: cannot use `g.0` because it was mutably borrowed
51 --> $DIR/borrowck-describe-lvalue.rs:44:9
54 | - borrow of `g` occurs here
56 | ^^^ use of borrowed `g`
58 | - borrow later used here
60 error[E0503]: cannot use `h.0` because it was mutably borrowed
61 --> $DIR/borrowck-describe-lvalue.rs:51:9
63 LL | let x = &mut h.0;
64 | -------- borrow of `h.0` occurs here
66 | ^^^ use of borrowed `h.0`
68 | - borrow later used here
70 error[E0503]: cannot use `e.0` because it was mutably borrowed
71 --> $DIR/borrowck-describe-lvalue.rs:59:20
74 | - borrow of `e` occurs here
76 LL | Baz::X(value) => value
77 | ^^^^^ use of borrowed `e`
80 | - borrow later used here
82 error[E0503]: cannot use `u.a` because it was mutably borrowed
83 --> $DIR/borrowck-describe-lvalue.rs:67:9
85 LL | let x = &mut u.a;
86 | -------- borrow of `u.a` occurs here
88 | ^^^ use of borrowed `u.a`
90 | - borrow later used here
92 error[E0503]: cannot use `f.x` because it was mutably borrowed
93 --> $DIR/borrowck-describe-lvalue.rs:74:9
96 | - borrow of `*f` occurs here
98 | ^^^ use of borrowed `*f`
100 | - borrow later used here
102 error[E0503]: cannot use `g.0` because it was mutably borrowed
103 --> $DIR/borrowck-describe-lvalue.rs:81:9
106 | - borrow of `*g` occurs here
108 | ^^^ use of borrowed `*g`
110 | - borrow later used here
112 error[E0503]: cannot use `h.0` because it was mutably borrowed
113 --> $DIR/borrowck-describe-lvalue.rs:88:9
115 LL | let x = &mut h.0;
116 | -------- borrow of `h.0` occurs here
118 | ^^^ use of borrowed `h.0`
120 | - borrow later used here
122 error[E0503]: cannot use `e.0` because it was mutably borrowed
123 --> $DIR/borrowck-describe-lvalue.rs:96:20
126 | - borrow of `*e` occurs here
128 LL | Baz::X(value) => value
129 | ^^^^^ use of borrowed `*e`
132 | - borrow later used here
134 error[E0503]: cannot use `u.a` because it was mutably borrowed
135 --> $DIR/borrowck-describe-lvalue.rs:105:9
137 LL | let x = &mut u.a;
138 | -------- borrow of `u.a` occurs here
140 | ^^^ use of borrowed `u.a`
142 | - borrow later used here
144 error[E0503]: cannot use `v[..]` because it was mutably borrowed
145 --> $DIR/borrowck-describe-lvalue.rs:113:15
148 | ------ borrow of `v` occurs here
150 LL | &[x, _, .., _, _] => println!("{}", x),
151 | ^ use of borrowed `v`
154 | - borrow later used here
156 error[E0503]: cannot use `v[..]` because it was mutably borrowed
157 --> $DIR/borrowck-describe-lvalue.rs:118:18
160 | ------ borrow of `v` occurs here
162 LL | &[_, x, .., _, _] => println!("{}", x),
163 | ^ use of borrowed `v`
166 | - borrow later used here
168 error[E0503]: cannot use `v[..]` because it was mutably borrowed
169 --> $DIR/borrowck-describe-lvalue.rs:123:25
172 | ------ borrow of `v` occurs here
174 LL | &[_, _, .., x, _] => println!("{}", x),
175 | ^ use of borrowed `v`
178 | - borrow later used here
180 error[E0503]: cannot use `v[..]` because it was mutably borrowed
181 --> $DIR/borrowck-describe-lvalue.rs:128:28
184 | ------ borrow of `v` occurs here
186 LL | &[_, _, .., _, x] => println!("{}", x),
187 | ^ use of borrowed `v`
190 | - borrow later used here
192 error[E0503]: cannot use `v[..]` because it was mutably borrowed
193 --> $DIR/borrowck-describe-lvalue.rs:139:15
196 | ------ borrow of `v` occurs here
198 LL | &[x @ ..] => println!("{:?}", x),
199 | ^^^^^^ use of borrowed `v`
202 | - borrow later used here
204 error[E0503]: cannot use `v[..]` because it was mutably borrowed
205 --> $DIR/borrowck-describe-lvalue.rs:144:18
208 | ------ borrow of `v` occurs here
210 LL | &[_, x @ ..] => println!("{:?}", x),
211 | ^^^^^^ use of borrowed `v`
214 | - borrow later used here
216 error[E0503]: cannot use `v[..]` because it was mutably borrowed
217 --> $DIR/borrowck-describe-lvalue.rs:149:15
220 | ------ borrow of `v` occurs here
222 LL | &[x @ .., _] => println!("{:?}", x),
223 | ^^^^^^ use of borrowed `v`
226 | - borrow later used here
228 error[E0503]: cannot use `v[..]` because it was mutably borrowed
229 --> $DIR/borrowck-describe-lvalue.rs:154:18
232 | ------ borrow of `v` occurs here
234 LL | &[_, x @ .., _] => println!("{:?}", x),
235 | ^^^^^^ use of borrowed `v`
238 | - borrow later used here
240 error[E0503]: cannot use `e` because it was mutably borrowed
241 --> $DIR/borrowck-describe-lvalue.rs:166:15
244 | ------ borrow of `e` occurs here
246 | ^ use of borrowed `e`
249 | - borrow later used here
251 error[E0502]: cannot borrow `e.0` as immutable because it is also borrowed as mutable
252 --> $DIR/borrowck-describe-lvalue.rs:168:18
255 | ------ mutable borrow occurs here
258 | ^^^^^^ immutable borrow occurs here
261 | - mutable borrow later used here
263 error[E0502]: cannot borrow `e.x` as immutable because it is also borrowed as mutable
264 --> $DIR/borrowck-describe-lvalue.rs:171:23
267 | ------ mutable borrow occurs here
269 LL | E::B { x: ref bx } =>
270 | ^^^^^^ immutable borrow occurs here
273 | - mutable borrow later used here
275 error[E0502]: cannot borrow `s.y.0` as immutable because it is also borrowed as mutable
276 --> $DIR/borrowck-describe-lvalue.rs:184:22
279 | ------ mutable borrow occurs here
281 LL | S { y: (ref y0, _), .. } =>
282 | ^^^^^^ immutable borrow occurs here
285 | - mutable borrow later used here
287 error[E0502]: cannot borrow `s.x.y` as immutable because it is also borrowed as mutable
288 --> $DIR/borrowck-describe-lvalue.rs:190:28
291 | ------ mutable borrow occurs here
293 LL | S { x: F { y: ref x0, .. }, .. } =>
294 | ^^^^^^ immutable borrow occurs here
297 | - mutable borrow later used here
299 error[E0503]: cannot use `*v` because it was mutably borrowed
300 --> $DIR/borrowck-describe-lvalue.rs:232:9
303 | ------ borrow of `v` occurs here
305 | ^^^^ use of borrowed `v`
308 | - borrow later used here
310 error[E0503]: cannot use `v[_].y` because it was mutably borrowed
311 --> $DIR/borrowck-describe-lvalue.rs:232:9
314 | ------ borrow of `v` occurs here
316 | ^^^^^^ use of borrowed `v`
319 | - borrow later used here
321 error[E0502]: cannot borrow `v[..].x` as immutable because it is also borrowed as mutable
322 --> $DIR/borrowck-describe-lvalue.rs:243:24
325 | ------ mutable borrow occurs here
327 LL | &[_, F {x: ref xf, ..}] => println!("{}", xf),
328 | ^^^^^^ immutable borrow occurs here
331 | - mutable borrow later used here
333 error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable
334 --> $DIR/borrowck-describe-lvalue.rs:206:29
336 LL | let x = &mut block;
337 | ---------- mutable borrow occurs here
338 LL | let p: &'a u8 = &*block.current;
339 | ^^^^^^^^^^^^^^^ immutable borrow occurs here
342 | - mutable borrow later used here
344 error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable
345 --> $DIR/borrowck-describe-lvalue.rs:221:33
347 LL | let x = &mut block;
348 | ---------- mutable borrow occurs here
349 LL | let p : *const u8 = &*(*block).current;
350 | ^^^^^^^^^^^^^^^^^^ immutable borrow occurs here
353 | - mutable borrow later used here
355 error[E0382]: use of moved value: `x`
356 --> $DIR/borrowck-describe-lvalue.rs:274:22
361 | ^ value used here after move
363 = note: move occurs because `x` has type `Vec<i32>`, which does not implement the `Copy` trait
365 error: aborting due to 32 previous errors
367 Some errors have detailed explanations: E0382, E0499, E0502, E0503.
368 For more information about an error, try `rustc --explain E0382`.