1 error[E0499]: cannot borrow `x` as mutable more than once at a time
2 --> $DIR/borrowck-describe-lvalue.rs:262: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:272: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:270:16
25 | - inferred to be a `FnMut` closure
27 LL | | let y = &mut x;
32 | |_________________^ returns a closure that contains a reference to a captured variable, which then escapes the closure body
34 = note: `FnMut` closures only have access to their captured variables while they are executing...
35 = note: ...therefore, they cannot allow references to captured variables to escape
37 error[E0503]: cannot use `f.x` because it was mutably borrowed
38 --> $DIR/borrowck-describe-lvalue.rs:41:9
41 | - borrow of `f` occurs here
43 | ^^^ use of borrowed `f`
45 | - borrow later used here
47 error[E0503]: cannot use `g.0` because it was mutably borrowed
48 --> $DIR/borrowck-describe-lvalue.rs:48:9
51 | - borrow of `g` occurs here
53 | ^^^ use of borrowed `g`
55 | - borrow later used here
57 error[E0503]: cannot use `h.0` because it was mutably borrowed
58 --> $DIR/borrowck-describe-lvalue.rs:55:9
60 LL | let x = &mut h.0;
61 | -------- borrow of `h.0` occurs here
63 | ^^^ use of borrowed `h.0`
65 | - borrow later used here
67 error[E0503]: cannot use `e.0` because it was mutably borrowed
68 --> $DIR/borrowck-describe-lvalue.rs:63:20
71 | - borrow of `e` occurs here
73 LL | Baz::X(value) => value
74 | ^^^^^ use of borrowed `e`
77 | - borrow later used here
79 error[E0503]: cannot use `u.a` because it was mutably borrowed
80 --> $DIR/borrowck-describe-lvalue.rs:71:9
82 LL | let x = &mut u.a;
83 | -------- borrow of `u.a` occurs here
85 | ^^^ use of borrowed `u.a`
87 | - borrow later used here
89 error[E0503]: cannot use `f.x` because it was mutably borrowed
90 --> $DIR/borrowck-describe-lvalue.rs:78:9
93 | - borrow of `*f` occurs here
95 | ^^^ use of borrowed `*f`
97 | - borrow later used here
99 error[E0503]: cannot use `g.0` because it was mutably borrowed
100 --> $DIR/borrowck-describe-lvalue.rs:85:9
103 | - borrow of `*g` occurs here
105 | ^^^ use of borrowed `*g`
107 | - borrow later used here
109 error[E0503]: cannot use `h.0` because it was mutably borrowed
110 --> $DIR/borrowck-describe-lvalue.rs:92:9
112 LL | let x = &mut h.0;
113 | -------- borrow of `h.0` occurs here
115 | ^^^ use of borrowed `h.0`
117 | - borrow later used here
119 error[E0503]: cannot use `e.0` because it was mutably borrowed
120 --> $DIR/borrowck-describe-lvalue.rs:100:20
123 | - borrow of `*e` occurs here
125 LL | Baz::X(value) => value
126 | ^^^^^ use of borrowed `*e`
129 | - borrow later used here
131 error[E0503]: cannot use `u.a` because it was mutably borrowed
132 --> $DIR/borrowck-describe-lvalue.rs:109:9
134 LL | let x = &mut u.a;
135 | -------- borrow of `u.a` occurs here
137 | ^^^ use of borrowed `u.a`
139 | - borrow later used here
141 error[E0503]: cannot use `v[..]` because it was mutably borrowed
142 --> $DIR/borrowck-describe-lvalue.rs:117:15
145 | ------ borrow of `v` occurs here
147 LL | &[x, _, .., _, _] => println!("{}", x),
148 | ^ use of borrowed `v`
151 | - borrow later used here
153 error[E0503]: cannot use `v[..]` because it was mutably borrowed
154 --> $DIR/borrowck-describe-lvalue.rs:122:18
157 | ------ borrow of `v` occurs here
159 LL | &[_, x, .., _, _] => println!("{}", x),
160 | ^ use of borrowed `v`
163 | - borrow later used here
165 error[E0503]: cannot use `v[..]` because it was mutably borrowed
166 --> $DIR/borrowck-describe-lvalue.rs:127:25
169 | ------ borrow of `v` occurs here
171 LL | &[_, _, .., x, _] => println!("{}", x),
172 | ^ use of borrowed `v`
175 | - borrow later used here
177 error[E0503]: cannot use `v[..]` because it was mutably borrowed
178 --> $DIR/borrowck-describe-lvalue.rs:132:28
181 | ------ borrow of `v` occurs here
183 LL | &[_, _, .., _, x] => println!("{}", x),
184 | ^ use of borrowed `v`
187 | - borrow later used here
189 error[E0503]: cannot use `v[..]` because it was mutably borrowed
190 --> $DIR/borrowck-describe-lvalue.rs:143:15
193 | ------ borrow of `v` occurs here
195 LL | &[x @ ..] => println!("{:?}", x),
196 | ^^^^^^ use of borrowed `v`
199 | - borrow later used here
201 error[E0503]: cannot use `v[..]` because it was mutably borrowed
202 --> $DIR/borrowck-describe-lvalue.rs:148:18
205 | ------ borrow of `v` occurs here
207 LL | &[_, x @ ..] => println!("{:?}", x),
208 | ^^^^^^ use of borrowed `v`
211 | - borrow later used here
213 error[E0503]: cannot use `v[..]` because it was mutably borrowed
214 --> $DIR/borrowck-describe-lvalue.rs:153:15
217 | ------ borrow of `v` occurs here
219 LL | &[x @ .., _] => println!("{:?}", x),
220 | ^^^^^^ use of borrowed `v`
223 | - borrow later used here
225 error[E0503]: cannot use `v[..]` because it was mutably borrowed
226 --> $DIR/borrowck-describe-lvalue.rs:158:18
229 | ------ borrow of `v` occurs here
231 LL | &[_, x @ .., _] => println!("{:?}", x),
232 | ^^^^^^ use of borrowed `v`
235 | - borrow later used here
237 error[E0503]: cannot use `e` because it was mutably borrowed
238 --> $DIR/borrowck-describe-lvalue.rs:171:13
241 | ------ borrow of `e` occurs here
244 | ^^^^^^^^^^^^ use of borrowed `e`
247 | - borrow later used here
249 error[E0502]: cannot borrow `e.0` as immutable because it is also borrowed as mutable
250 --> $DIR/borrowck-describe-lvalue.rs:171:18
253 | ------ mutable borrow occurs here
256 | ^^^^^^ immutable borrow occurs here
259 | - mutable borrow later used here
261 error[E0502]: cannot borrow `e.x` as immutable because it is also borrowed as mutable
262 --> $DIR/borrowck-describe-lvalue.rs:175:23
265 | ------ mutable borrow occurs here
267 LL | E::B { x: ref bx } =>
268 | ^^^^^^ immutable borrow occurs here
271 | - mutable borrow later used here
273 error[E0502]: cannot borrow `s.y.0` as immutable because it is also borrowed as mutable
274 --> $DIR/borrowck-describe-lvalue.rs:188:22
277 | ------ mutable borrow occurs here
279 LL | S { y: (ref y0, _), .. } =>
280 | ^^^^^^ immutable borrow occurs here
283 | - mutable borrow later used here
285 error[E0502]: cannot borrow `s.x.y` as immutable because it is also borrowed as mutable
286 --> $DIR/borrowck-describe-lvalue.rs:194:28
289 | ------ mutable borrow occurs here
291 LL | S { x: F { y: ref x0, .. }, .. } =>
292 | ^^^^^^ immutable borrow occurs here
295 | - mutable borrow later used here
297 error[E0503]: cannot use `*v` because it was mutably borrowed
298 --> $DIR/borrowck-describe-lvalue.rs:240:9
301 | ------ borrow of `v` occurs here
303 | ^^^^ use of borrowed `v`
306 | - borrow later used here
308 error[E0503]: cannot use `v[_].y` because it was mutably borrowed
309 --> $DIR/borrowck-describe-lvalue.rs:240:9
312 | ------ borrow of `v` occurs here
314 | ^^^^^^ use of borrowed `v`
317 | - borrow later used here
319 error[E0502]: cannot borrow `v[..].x` as immutable because it is also borrowed as mutable
320 --> $DIR/borrowck-describe-lvalue.rs:251:24
323 | ------ mutable borrow occurs here
325 LL | &[_, F {x: ref xf, ..}] => println!("{}", xf),
326 | ^^^^^^ immutable borrow occurs here
329 | - mutable borrow later used here
331 error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable
332 --> $DIR/borrowck-describe-lvalue.rs:210:29
334 LL | let x = &mut block;
335 | ---------- mutable borrow occurs here
336 LL | let p: &'a u8 = &*block.current;
337 | ^^^^^^^^^^^^^^^ immutable borrow occurs here
340 | - mutable borrow later used here
342 error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable
343 --> $DIR/borrowck-describe-lvalue.rs:227:33
345 LL | let x = &mut block;
346 | ---------- mutable borrow occurs here
347 LL | let p : *const u8 = &*(*block).current;
348 | ^^^^^^^^^^^^^^^^^^ immutable borrow occurs here
351 | - mutable borrow later used here
353 error[E0382]: use of moved value: `x`
354 --> $DIR/borrowck-describe-lvalue.rs:282:22
359 | ^ value used here after move
361 = note: move occurs because `x` has type `std::vec::Vec<i32>`, which does not implement the `Copy` trait
363 error: aborting due to 32 previous errors
365 Some errors have detailed explanations: E0382, E0499, E0502, E0503.
366 For more information about an error, try `rustc --explain E0382`.