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
39 help: consider adding 'move' keyword before the nested closure
44 error[E0503]: cannot use `f.x` because it was mutably borrowed
45 --> $DIR/borrowck-describe-lvalue.rs:37:9
48 | ----- borrow of `f` occurs here
50 | ^^^ use of borrowed `f`
52 | - borrow later used here
54 error[E0503]: cannot use `g.0` because it was mutably borrowed
55 --> $DIR/borrowck-describe-lvalue.rs:44:9
58 | ----- borrow of `g` occurs here
60 | ^^^ use of borrowed `g`
62 | - borrow later used here
64 error[E0503]: cannot use `h.0` because it was mutably borrowed
65 --> $DIR/borrowck-describe-lvalue.rs:51:9
67 LL | let x = &mut h.0;
68 | -------- borrow of `h.0` occurs here
70 | ^^^ use of borrowed `h.0`
72 | - borrow later used here
74 error[E0503]: cannot use `e.0` because it was mutably borrowed
75 --> $DIR/borrowck-describe-lvalue.rs:59:20
78 | ----- borrow of `e` occurs here
80 LL | Baz::X(value) => value
81 | ^^^^^ use of borrowed `e`
84 | - borrow later used here
86 error[E0503]: cannot use `u.a` because it was mutably borrowed
87 --> $DIR/borrowck-describe-lvalue.rs:67:9
89 LL | let x = &mut u.a;
90 | -------- borrow of `u.a` occurs here
92 | ^^^ use of borrowed `u.a`
94 | - borrow later used here
96 error[E0503]: cannot use `f.x` because it was mutably borrowed
97 --> $DIR/borrowck-describe-lvalue.rs:74:9
100 | ----- borrow of `*f` occurs here
102 | ^^^ use of borrowed `*f`
104 | - borrow later used here
106 error[E0503]: cannot use `g.0` because it was mutably borrowed
107 --> $DIR/borrowck-describe-lvalue.rs:81:9
110 | ----- borrow of `*g` occurs here
112 | ^^^ use of borrowed `*g`
114 | - borrow later used here
116 error[E0503]: cannot use `h.0` because it was mutably borrowed
117 --> $DIR/borrowck-describe-lvalue.rs:88:9
119 LL | let x = &mut h.0;
120 | -------- borrow of `h.0` occurs here
122 | ^^^ use of borrowed `h.0`
124 | - borrow later used here
126 error[E0503]: cannot use `e.0` because it was mutably borrowed
127 --> $DIR/borrowck-describe-lvalue.rs:96:20
130 | ----- borrow of `*e` occurs here
132 LL | Baz::X(value) => value
133 | ^^^^^ use of borrowed `*e`
136 | - borrow later used here
138 error[E0503]: cannot use `u.a` because it was mutably borrowed
139 --> $DIR/borrowck-describe-lvalue.rs:105:9
141 LL | let x = &mut u.a;
142 | -------- borrow of `u.a` occurs here
144 | ^^^ use of borrowed `u.a`
146 | - borrow later used here
148 error[E0503]: cannot use `v[..]` because it was mutably borrowed
149 --> $DIR/borrowck-describe-lvalue.rs:113:15
152 | ------ borrow of `v` occurs here
154 LL | &[x, _, .., _, _] => println!("{}", x),
155 | ^ use of borrowed `v`
158 | - borrow later used here
160 error[E0503]: cannot use `v[..]` because it was mutably borrowed
161 --> $DIR/borrowck-describe-lvalue.rs:118:18
164 | ------ borrow of `v` occurs here
166 LL | &[_, x, .., _, _] => println!("{}", x),
167 | ^ use of borrowed `v`
170 | - borrow later used here
172 error[E0503]: cannot use `v[..]` because it was mutably borrowed
173 --> $DIR/borrowck-describe-lvalue.rs:123:25
176 | ------ borrow of `v` occurs here
178 LL | &[_, _, .., x, _] => println!("{}", x),
179 | ^ use of borrowed `v`
182 | - borrow later used here
184 error[E0503]: cannot use `v[..]` because it was mutably borrowed
185 --> $DIR/borrowck-describe-lvalue.rs:128:28
188 | ------ borrow of `v` occurs here
190 LL | &[_, _, .., _, x] => println!("{}", x),
191 | ^ use of borrowed `v`
194 | - borrow later used here
196 error[E0503]: cannot use `v[..]` because it was mutably borrowed
197 --> $DIR/borrowck-describe-lvalue.rs:139:15
200 | ------ borrow of `v` occurs here
202 LL | &[x @ ..] => println!("{:?}", x),
203 | ^ use of borrowed `v`
206 | - borrow later used here
208 error[E0503]: cannot use `v[..]` because it was mutably borrowed
209 --> $DIR/borrowck-describe-lvalue.rs:144:18
212 | ------ borrow of `v` occurs here
214 LL | &[_, x @ ..] => println!("{:?}", x),
215 | ^ use of borrowed `v`
218 | - borrow later used here
220 error[E0503]: cannot use `v[..]` because it was mutably borrowed
221 --> $DIR/borrowck-describe-lvalue.rs:149:15
224 | ------ borrow of `v` occurs here
226 LL | &[x @ .., _] => println!("{:?}", x),
227 | ^ use of borrowed `v`
230 | - borrow later used here
232 error[E0503]: cannot use `v[..]` because it was mutably borrowed
233 --> $DIR/borrowck-describe-lvalue.rs:154:18
236 | ------ borrow of `v` occurs here
238 LL | &[_, x @ .., _] => println!("{:?}", x),
239 | ^ use of borrowed `v`
242 | - borrow later used here
244 error[E0503]: cannot use `e` because it was mutably borrowed
245 --> $DIR/borrowck-describe-lvalue.rs:166:15
248 | ------ borrow of `e` occurs here
250 | ^ use of borrowed `e`
253 | - borrow later used here
255 error[E0502]: cannot borrow `e.0` as immutable because it is also borrowed as mutable
256 --> $DIR/borrowck-describe-lvalue.rs:168:18
259 | ------ mutable borrow occurs here
262 | ^^^^^^ immutable borrow occurs here
265 | - mutable borrow later used here
267 error[E0502]: cannot borrow `e.x` as immutable because it is also borrowed as mutable
268 --> $DIR/borrowck-describe-lvalue.rs:171:23
271 | ------ mutable borrow occurs here
273 LL | E::B { x: ref bx } =>
274 | ^^^^^^ immutable borrow occurs here
277 | - mutable borrow later used here
279 error[E0502]: cannot borrow `s.y.0` as immutable because it is also borrowed as mutable
280 --> $DIR/borrowck-describe-lvalue.rs:184:22
283 | ------ mutable borrow occurs here
285 LL | S { y: (ref y0, _), .. } =>
286 | ^^^^^^ immutable borrow occurs here
289 | - mutable borrow later used here
291 error[E0502]: cannot borrow `s.x.y` as immutable because it is also borrowed as mutable
292 --> $DIR/borrowck-describe-lvalue.rs:190:28
295 | ------ mutable borrow occurs here
297 LL | S { x: F { y: ref x0, .. }, .. } =>
298 | ^^^^^^ immutable borrow occurs here
301 | - mutable borrow later used here
303 error[E0503]: cannot use `*v` because it was mutably borrowed
304 --> $DIR/borrowck-describe-lvalue.rs:232:9
307 | ------ borrow of `v` occurs here
309 | ^^^^ use of borrowed `v`
312 | - borrow later used here
314 error[E0503]: cannot use `v[_].y` because it was mutably borrowed
315 --> $DIR/borrowck-describe-lvalue.rs:232:9
318 | ------ borrow of `v` occurs here
320 | ^^^^^^ use of borrowed `v`
323 | - borrow later used here
325 error[E0502]: cannot borrow `v[..].x` as immutable because it is also borrowed as mutable
326 --> $DIR/borrowck-describe-lvalue.rs:243:24
329 | ------ mutable borrow occurs here
331 LL | &[_, F {x: ref xf, ..}] => println!("{}", xf),
332 | ^^^^^^ immutable borrow occurs here
335 | - mutable borrow later used here
337 error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable
338 --> $DIR/borrowck-describe-lvalue.rs:206:29
340 LL | let x = &mut block;
341 | ---------- mutable borrow occurs here
342 LL | let p: &'a u8 = &*block.current;
343 | ^^^^^^^^^^^^^^^ immutable borrow occurs here
346 | - mutable borrow later used here
348 error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable
349 --> $DIR/borrowck-describe-lvalue.rs:221:33
351 LL | let x = &mut block;
352 | ---------- mutable borrow occurs here
353 LL | let p : *const u8 = &*(*block).current;
354 | ^^^^^^^^^^^^^^^^^^ immutable borrow occurs here
357 | - mutable borrow later used here
359 error[E0382]: use of moved value: `x`
360 --> $DIR/borrowck-describe-lvalue.rs:274:22
365 | ^ value used here after move
367 = note: move occurs because `x` has type `Vec<i32>`, which does not implement the `Copy` trait
369 error: aborting due to 32 previous errors
371 Some errors have detailed explanations: E0382, E0499, E0502, E0503.
372 For more information about an error, try `rustc --explain E0382`.