1 error[E0505]: cannot move out of `x` because it is borrowed
2 --> $DIR/borrow-tuple-fields.rs:22:9
5 | --- borrow of `x.0` occurs here
6 LL | let y = x; //~ ERROR cannot move out of `x` because it is borrowed
7 | ^ move out of `x` occurs here
9 error[E0502]: cannot borrow `x.0` as mutable because it is also borrowed as immutable
10 --> $DIR/borrow-tuple-fields.rs:28:18
13 | --- immutable borrow occurs here
14 LL | let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable because it is also borrowed as
15 | ^^^ mutable borrow occurs here
18 | - immutable borrow ends here
20 error[E0499]: cannot borrow `x.0` as mutable more than once at a time
21 --> $DIR/borrow-tuple-fields.rs:33:18
23 LL | let a = &mut x.0;
24 | --- first mutable borrow occurs here
25 LL | let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable more than once at a time
26 | ^^^ second mutable borrow occurs here
29 | - first borrow ends here
31 error[E0505]: cannot move out of `x` because it is borrowed
32 --> $DIR/borrow-tuple-fields.rs:38:9
35 | --- borrow of `x.0` occurs here
36 LL | let y = x; //~ ERROR cannot move out of `x` because it is borrowed
37 | ^ move out of `x` occurs here
39 error[E0502]: cannot borrow `x.0` as mutable because it is also borrowed as immutable
40 --> $DIR/borrow-tuple-fields.rs:43:18
43 | --- immutable borrow occurs here
44 LL | let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable because it is also borrowed as
45 | ^^^ mutable borrow occurs here
48 | - immutable borrow ends here
50 error[E0499]: cannot borrow `x.0` as mutable more than once at a time
51 --> $DIR/borrow-tuple-fields.rs:48:18
53 LL | let a = &mut x.0;
54 | --- first mutable borrow occurs here
55 LL | let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable more than once at a time
56 | ^^^ second mutable borrow occurs here
59 | - first borrow ends here
61 error: aborting due to 6 previous errors
63 Some errors occurred: E0499, E0502, E0505.
64 For more information about an error, try `rustc --explain E0499`.