1 error[E0503]: cannot use `f.x` because it was mutably borrowed
2 --> $DIR/borrowck-describe-lvalue.rs:43:9
5 | - borrow of `f` occurs here
6 LL | f.x; //[ast]~ ERROR cannot use `f.x` because it was mutably borrowed
7 | ^^^ use of borrowed `f`
9 error[E0503]: cannot use `g.0` because it was mutably borrowed
10 --> $DIR/borrowck-describe-lvalue.rs:51:9
13 | - borrow of `g` occurs here
14 LL | g.0; //[ast]~ ERROR cannot use `g.0` because it was mutably borrowed
15 | ^^^ use of borrowed `g`
17 error[E0503]: cannot use `h.0` because it was mutably borrowed
18 --> $DIR/borrowck-describe-lvalue.rs:59:9
20 LL | let x = &mut h.0;
21 | --- borrow of `h.0` occurs here
22 LL | h.0; //[ast]~ ERROR cannot use `h.0` because it was mutably borrowed
23 | ^^^ use of borrowed `h.0`
25 error[E0503]: cannot use `e.0` because it was mutably borrowed
26 --> $DIR/borrowck-describe-lvalue.rs:68:20
29 | - borrow of `e` occurs here
31 LL | Baz::X(value) => value
32 | ^^^^^ use of borrowed `e`
34 error[E0503]: cannot use `u.a` because it was mutably borrowed
35 --> $DIR/borrowck-describe-lvalue.rs:78:9
37 LL | let x = &mut u.a;
38 | --- borrow of `u.a` occurs here
39 LL | u.a; //[ast]~ ERROR cannot use `u.a` because it was mutably borrowed
40 | ^^^ use of borrowed `u.a`
42 error[E0503]: cannot use `f.x` because it was mutably borrowed
43 --> $DIR/borrowck-describe-lvalue.rs:86:9
46 | - borrow of `*f` occurs here
47 LL | f.x; //[ast]~ ERROR cannot use `f.x` because it was mutably borrowed
48 | ^^^ use of borrowed `*f`
50 error[E0503]: cannot use `g.0` because it was mutably borrowed
51 --> $DIR/borrowck-describe-lvalue.rs:94:9
54 | - borrow of `*g` occurs here
55 LL | g.0; //[ast]~ ERROR cannot use `g.0` because it was mutably borrowed
56 | ^^^ use of borrowed `*g`
58 error[E0503]: cannot use `h.0` because it was mutably borrowed
59 --> $DIR/borrowck-describe-lvalue.rs:102:9
61 LL | let x = &mut h.0;
62 | --- borrow of `h.0` occurs here
63 LL | h.0; //[ast]~ ERROR cannot use `h.0` because it was mutably borrowed
64 | ^^^ use of borrowed `h.0`
66 error[E0503]: cannot use `e.0` because it was mutably borrowed
67 --> $DIR/borrowck-describe-lvalue.rs:111:20
70 | - borrow of `*e` occurs here
72 LL | Baz::X(value) => value
73 | ^^^^^ use of borrowed `*e`
75 error[E0503]: cannot use `u.a` because it was mutably borrowed
76 --> $DIR/borrowck-describe-lvalue.rs:121:9
78 LL | let x = &mut u.a;
79 | --- borrow of `u.a` occurs here
80 LL | u.a; //[ast]~ ERROR cannot use `u.a` because it was mutably borrowed
81 | ^^^ use of borrowed `u.a`
83 error[E0503]: cannot use `v[..]` because it was mutably borrowed
84 --> $DIR/borrowck-describe-lvalue.rs:130:15
87 | - borrow of `v` occurs here
89 LL | &[x, _, .., _, _] => println!("{}", x),
90 | ^ use of borrowed `v`
92 error[E0503]: cannot use `v[..]` because it was mutably borrowed
93 --> $DIR/borrowck-describe-lvalue.rs:136:18
96 | - borrow of `v` occurs here
98 LL | &[_, x, .., _, _] => println!("{}", x),
99 | ^ use of borrowed `v`
101 error[E0503]: cannot use `v[..]` because it was mutably borrowed
102 --> $DIR/borrowck-describe-lvalue.rs:142:25
105 | - borrow of `v` occurs here
107 LL | &[_, _, .., x, _] => println!("{}", x),
108 | ^ use of borrowed `v`
110 error[E0503]: cannot use `v[..]` because it was mutably borrowed
111 --> $DIR/borrowck-describe-lvalue.rs:148:28
114 | - borrow of `v` occurs here
116 LL | &[_, _, .., _, x] => println!("{}", x),
117 | ^ use of borrowed `v`
119 error[E0503]: cannot use `v[..]` because it was mutably borrowed
120 --> $DIR/borrowck-describe-lvalue.rs:160:15
123 | - borrow of `v` occurs here
125 LL | &[x..] => println!("{:?}", x),
126 | ^ use of borrowed `v`
128 error[E0503]: cannot use `v[..]` because it was mutably borrowed
129 --> $DIR/borrowck-describe-lvalue.rs:166:18
132 | - borrow of `v` occurs here
134 LL | &[_, x..] => println!("{:?}", x),
135 | ^ use of borrowed `v`
137 error[E0503]: cannot use `v[..]` because it was mutably borrowed
138 --> $DIR/borrowck-describe-lvalue.rs:172:15
141 | - borrow of `v` occurs here
143 LL | &[x.., _] => println!("{:?}", x),
144 | ^ use of borrowed `v`
146 error[E0503]: cannot use `v[..]` because it was mutably borrowed
147 --> $DIR/borrowck-describe-lvalue.rs:178:18
150 | - borrow of `v` occurs here
152 LL | &[_, x.., _] => println!("{:?}", x),
153 | ^ use of borrowed `v`
155 error[E0502]: cannot borrow `e.0` as immutable because `e` is also borrowed as mutable
156 --> $DIR/borrowck-describe-lvalue.rs:192:18
159 | - mutable borrow occurs here
162 | ^^^^^^ immutable borrow occurs here
165 | - mutable borrow ends here
167 error[E0502]: cannot borrow `e.x` as immutable because `e` is also borrowed as mutable
168 --> $DIR/borrowck-describe-lvalue.rs:197:23
171 | - mutable borrow occurs here
173 LL | E::B { x: ref bx } =>
174 | ^^^^^^ immutable borrow occurs here
177 | - mutable borrow ends here
179 error[E0502]: cannot borrow `s.y.0` as immutable because `s` is also borrowed as mutable
180 --> $DIR/borrowck-describe-lvalue.rs:211:22
183 | - mutable borrow occurs here
185 LL | S { y: (ref y0, _), .. } =>
186 | ^^^^^^ immutable borrow occurs here
189 | - mutable borrow ends here
191 error[E0502]: cannot borrow `s.x.y` as immutable because `s` is also borrowed as mutable
192 --> $DIR/borrowck-describe-lvalue.rs:218:28
195 | - mutable borrow occurs here
197 LL | S { x: F { y: ref x0, .. }, .. } =>
198 | ^^^^^^ immutable borrow occurs here
201 | - mutable borrow ends here
203 error[E0503]: cannot use `v[..].y` because it was mutably borrowed
204 --> $DIR/borrowck-describe-lvalue.rs:261:9
207 | - borrow of `v` occurs here
209 | ^^^^^^ use of borrowed `v`
211 error[E0499]: cannot borrow `**x` as mutable more than once at a time
212 --> $DIR/borrowck-describe-lvalue.rs:285:18
215 | - first mutable borrow occurs here
216 LL | &mut x; //[ast]~ ERROR cannot borrow `**x` as mutable more than once at a time
217 | ^ second mutable borrow occurs here
220 | - first borrow ends here
222 error[E0499]: cannot borrow `**x` as mutable more than once at a time
223 --> $DIR/borrowck-describe-lvalue.rs:296:25
226 | - first mutable borrow occurs here
227 LL | &mut x; //[ast]~ ERROR cannot borrow `**x` as mutable more than once at a time
228 | ^ second mutable borrow occurs here
231 | - first borrow ends here
233 error[E0382]: use of moved value: `x`
234 --> $DIR/borrowck-describe-lvalue.rs:307:22
238 LL | drop(x); //[ast]~ ERROR use of moved value: `x`
239 | ^ value used here after move
241 = note: move occurs because `x` has type `std::vec::Vec<i32>`, which does not implement the `Copy` trait
243 error: aborting due to 26 previous errors
245 Some errors occurred: E0382, E0499, E0502, E0503.
246 For more information about an error, try `rustc --explain E0382`.