1 error[E0505]: cannot move out of `x` because it is borrowed
2 --> $DIR/borrow-tuple-fields.rs:12:13
4 LL | let x: (Box<_>, _) = (Box::new(1), 2);
5 | - binding `x` declared here
7 | ---- borrow of `x.0` occurs here
9 | ^ move out of `x` occurs here
12 | ----------- borrow later used here
14 error[E0502]: cannot borrow `x.0` as mutable because it is also borrowed as immutable
15 --> $DIR/borrow-tuple-fields.rs:18:13
18 | ---- immutable borrow occurs here
19 LL | let b = &mut x.0;
20 | ^^^^^^^^ mutable borrow occurs here
22 | ----------- immutable borrow later used here
24 error[E0499]: cannot borrow `x.0` as mutable more than once at a time
25 --> $DIR/borrow-tuple-fields.rs:23:13
27 LL | let a = &mut x.0;
28 | -------- first mutable borrow occurs here
29 LL | let b = &mut x.0;
30 | ^^^^^^^^ second mutable borrow occurs here
32 | ----------- first borrow later used here
34 error[E0505]: cannot move out of `x` because it is borrowed
35 --> $DIR/borrow-tuple-fields.rs:28:13
37 LL | let x = Foo(Box::new(1), 2);
38 | - binding `x` declared here
40 | ---- borrow of `x.0` occurs here
42 | ^ move out of `x` occurs here
44 | ----------- borrow later used here
46 error[E0502]: cannot borrow `x.0` as mutable because it is also borrowed as immutable
47 --> $DIR/borrow-tuple-fields.rs:33:13
50 | ---- immutable borrow occurs here
51 LL | let b = &mut x.0;
52 | ^^^^^^^^ mutable borrow occurs here
54 | ----------- immutable borrow later used here
56 error[E0499]: cannot borrow `x.0` as mutable more than once at a time
57 --> $DIR/borrow-tuple-fields.rs:38:13
59 LL | let a = &mut x.0;
60 | -------- first mutable borrow occurs here
61 LL | let b = &mut x.0;
62 | ^^^^^^^^ second mutable borrow occurs here
64 | ----------- first borrow later used here
66 error: aborting due to 6 previous errors
68 Some errors have detailed explanations: E0499, E0502, E0505.
69 For more information about an error, try `rustc --explain E0499`.