| error[E0503]: cannot use `f.x` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:43:9 |
| | |
| LL | let x = f.x(); |
| | - borrow of `f` occurs here |
| LL | f.x; |
| | ^^^ use of borrowed `f` |
| |
| error[E0503]: cannot use `g.0` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:51:9 |
| | |
| LL | let x = g.x(); |
| | - borrow of `g` occurs here |
| LL | g.0; |
| | ^^^ use of borrowed `g` |
| |
| error[E0503]: cannot use `h.0` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:59:9 |
| | |
| LL | let x = &mut h.0; |
| | --- borrow of `h.0` occurs here |
| LL | h.0; |
| | ^^^ use of borrowed `h.0` |
| |
| error[E0503]: cannot use `e.0` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:68:20 |
| | |
| LL | let x = e.x(); |
| | - borrow of `e` occurs here |
| LL | match e { |
| LL | Baz::X(value) => value |
| | ^^^^^ use of borrowed `e` |
| |
| error[E0503]: cannot use `u.a` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:78:9 |
| | |
| LL | let x = &mut u.a; |
| | --- borrow of `u.a` occurs here |
| LL | u.a; |
| | ^^^ use of borrowed `u.a` |
| |
| error[E0503]: cannot use `f.x` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:86:9 |
| | |
| LL | let x = f.x(); |
| | - borrow of `*f` occurs here |
| LL | f.x; |
| | ^^^ use of borrowed `*f` |
| |
| error[E0503]: cannot use `g.0` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:94:9 |
| | |
| LL | let x = g.x(); |
| | - borrow of `*g` occurs here |
| LL | g.0; |
| | ^^^ use of borrowed `*g` |
| |
| error[E0503]: cannot use `h.0` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:102:9 |
| | |
| LL | let x = &mut h.0; |
| | --- borrow of `h.0` occurs here |
| LL | h.0; |
| | ^^^ use of borrowed `h.0` |
| |
| error[E0503]: cannot use `e.0` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:111:20 |
| | |
| LL | let x = e.x(); |
| | - borrow of `*e` occurs here |
| LL | match *e { |
| LL | Baz::X(value) => value |
| | ^^^^^ use of borrowed `*e` |
| |
| error[E0503]: cannot use `u.a` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:121:9 |
| | |
| LL | let x = &mut u.a; |
| | --- borrow of `u.a` occurs here |
| LL | u.a; |
| | ^^^ use of borrowed `u.a` |
| |
| error[E0503]: cannot use `v[..]` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:130:15 |
| | |
| LL | let x = &mut v; |
| | - borrow of `v` occurs here |
| LL | match v { |
| LL | &[x, _, .., _, _] => println!("{}", x), |
| | ^ use of borrowed `v` |
| |
| error[E0503]: cannot use `v[..]` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:136:18 |
| | |
| LL | let x = &mut v; |
| | - borrow of `v` occurs here |
| ... |
| LL | &[_, x, .., _, _] => println!("{}", x), |
| | ^ use of borrowed `v` |
| |
| error[E0503]: cannot use `v[..]` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:142:25 |
| | |
| LL | let x = &mut v; |
| | - borrow of `v` occurs here |
| ... |
| LL | &[_, _, .., x, _] => println!("{}", x), |
| | ^ use of borrowed `v` |
| |
| error[E0503]: cannot use `v[..]` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:148:28 |
| | |
| LL | let x = &mut v; |
| | - borrow of `v` occurs here |
| ... |
| LL | &[_, _, .., _, x] => println!("{}", x), |
| | ^ use of borrowed `v` |
| |
| error[E0503]: cannot use `v[..]` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:160:15 |
| | |
| LL | let x = &mut v; |
| | - borrow of `v` occurs here |
| LL | match v { |
| LL | &[x..] => println!("{:?}", x), |
| | ^ use of borrowed `v` |
| |
| error[E0503]: cannot use `v[..]` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:166:18 |
| | |
| LL | let x = &mut v; |
| | - borrow of `v` occurs here |
| ... |
| LL | &[_, x..] => println!("{:?}", x), |
| | ^ use of borrowed `v` |
| |
| error[E0503]: cannot use `v[..]` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:172:15 |
| | |
| LL | let x = &mut v; |
| | - borrow of `v` occurs here |
| ... |
| LL | &[x.., _] => println!("{:?}", x), |
| | ^ use of borrowed `v` |
| |
| error[E0503]: cannot use `v[..]` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:178:18 |
| | |
| LL | let x = &mut v; |
| | - borrow of `v` occurs here |
| ... |
| LL | &[_, x.., _] => println!("{:?}", x), |
| | ^ use of borrowed `v` |
| |
| error[E0502]: cannot borrow `e.0` as immutable because `e` is also borrowed as mutable |
| --> $DIR/borrowck-describe-lvalue.rs:192:18 |
| | |
| LL | let x = &mut e; |
| | - mutable borrow occurs here |
| LL | match e { |
| LL | E::A(ref ax) => |
| | ^^^^^^ immutable borrow occurs here |
| ... |
| LL | } |
| | - mutable borrow ends here |
| |
| error[E0502]: cannot borrow `e.x` as immutable because `e` is also borrowed as mutable |
| --> $DIR/borrowck-describe-lvalue.rs:197:23 |
| | |
| LL | let x = &mut e; |
| | - mutable borrow occurs here |
| ... |
| LL | E::B { x: ref bx } => |
| | ^^^^^^ immutable borrow occurs here |
| ... |
| LL | } |
| | - mutable borrow ends here |
| |
| error[E0502]: cannot borrow `s.y.0` as immutable because `s` is also borrowed as mutable |
| --> $DIR/borrowck-describe-lvalue.rs:211:22 |
| | |
| LL | let x = &mut s; |
| | - mutable borrow occurs here |
| LL | match s { |
| LL | S { y: (ref y0, _), .. } => |
| | ^^^^^^ immutable borrow occurs here |
| ... |
| LL | } |
| | - mutable borrow ends here |
| |
| error[E0502]: cannot borrow `s.x.y` as immutable because `s` is also borrowed as mutable |
| --> $DIR/borrowck-describe-lvalue.rs:218:28 |
| | |
| LL | let x = &mut s; |
| | - mutable borrow occurs here |
| ... |
| LL | S { x: F { y: ref x0, .. }, .. } => |
| | ^^^^^^ immutable borrow occurs here |
| ... |
| LL | } |
| | - mutable borrow ends here |
| |
| error[E0503]: cannot use `v[..].y` because it was mutably borrowed |
| --> $DIR/borrowck-describe-lvalue.rs:261:9 |
| | |
| LL | let x = &mut v; |
| | - borrow of `v` occurs here |
| LL | v[0].y; |
| | ^^^^^^ use of borrowed `v` |
| |
| error[E0499]: cannot borrow `**x` as mutable more than once at a time |
| --> $DIR/borrowck-describe-lvalue.rs:285:18 |
| | |
| LL | let y = &mut x; |
| | - first mutable borrow occurs here |
| LL | &mut x; |
| | ^ second mutable borrow occurs here |
| ... |
| LL | }; |
| | - first borrow ends here |
| |
| error[E0499]: cannot borrow `**x` as mutable more than once at a time |
| --> $DIR/borrowck-describe-lvalue.rs:296:25 |
| | |
| LL | let y = &mut x; |
| | - first mutable borrow occurs here |
| LL | &mut x; |
| | ^ second mutable borrow occurs here |
| ... |
| LL | } |
| | - first borrow ends here |
| |
| error[E0382]: use of moved value: `x` |
| --> $DIR/borrowck-describe-lvalue.rs:307:22 |
| | |
| LL | drop(x); |
| | - value moved here |
| LL | drop(x); |
| | ^ value used here after move |
| | |
| = note: move occurs because `x` has type `std::vec::Vec<i32>`, which does not implement the `Copy` trait |
| |
| error: aborting due to 26 previous errors |
| |
| Some errors occurred: E0382, E0499, E0502, E0503. |
| For more information about an error, try `rustc --explain E0382`. |