1 error[E0382]: use of moved value: `a`
2 --> $DIR/borrowck-box-insensitivity.rs:37:9
6 LL | //[ast]~^ value moved here
7 LL | let _y = a.y; //[ast]~ ERROR use of moved
8 | ^^ value used here after move
10 = note: move occurs because `a.x` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
12 error[E0382]: use of moved value: `a`
13 --> $DIR/borrowck-box-insensitivity.rs:46:9
17 LL | //[ast]~^ value moved here
18 LL | let _y = a.y; //[ast]~ ERROR use of moved
19 | ^^ value used here after move
21 = note: move occurs because `a.x` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
23 error[E0382]: use of moved value: `a`
24 --> $DIR/borrowck-box-insensitivity.rs:55:15
28 LL | //[ast]~^ value moved here
29 LL | let _y = &a.y; //[ast]~ ERROR use of moved
30 | ^^^ value used here after move
32 = note: move occurs because `a.x` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
34 error[E0505]: cannot move out of `a.y` because it is borrowed
35 --> $DIR/borrowck-box-insensitivity.rs:63:9
38 | --- borrow of `a.x` occurs here
40 | ^^ move out of `a.y` occurs here
42 error[E0503]: cannot use `a.y` because it was mutably borrowed
43 --> $DIR/borrowck-box-insensitivity.rs:71:9
45 LL | let _x = &mut a.x;
46 | --- borrow of `a.x` occurs here
47 LL | let _y = a.y; //[ast]~ ERROR cannot use
48 | ^^ use of borrowed `a.x`
50 error[E0505]: cannot move out of `a.y` because it is borrowed
51 --> $DIR/borrowck-box-insensitivity.rs:77:9
53 LL | let _x = &mut a.x;
54 | --- borrow of `a.x` occurs here
56 | ^^ move out of `a.y` occurs here
58 error[E0502]: cannot borrow `a` (via `a.y`) as immutable because `a` is also borrowed as mutable (via `a.x`)
59 --> $DIR/borrowck-box-insensitivity.rs:85:15
61 LL | let _x = &mut a.x;
62 | --- mutable borrow occurs here (via `a.x`)
63 LL | let _y = &a.y; //[ast]~ ERROR cannot borrow
64 | ^^^ immutable borrow occurs here (via `a.y`)
67 | - mutable borrow ends here
69 error[E0502]: cannot borrow `a` (via `a.y`) as mutable because `a` is also borrowed as immutable (via `a.x`)
70 --> $DIR/borrowck-box-insensitivity.rs:92:19
73 | --- immutable borrow occurs here (via `a.x`)
74 LL | let _y = &mut a.y; //[ast]~ ERROR cannot borrow
75 | ^^^ mutable borrow occurs here (via `a.y`)
78 | - immutable borrow ends here
80 error[E0382]: use of collaterally moved value: `a.y`
81 --> $DIR/borrowck-box-insensitivity.rs:100:9
85 LL | //[ast]~^ value moved here
86 LL | let _y = a.y; //[ast]~ ERROR use of collaterally moved
87 | ^^ value used here after move
89 = note: move occurs because `a.x.x` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
91 error[E0382]: use of collaterally moved value: `a.y`
92 --> $DIR/borrowck-box-insensitivity.rs:108:9
96 LL | //[ast]~^ value moved here
97 LL | let _y = a.y; //[ast]~ ERROR use of collaterally moved
98 | ^^ value used here after move
100 = note: move occurs because `a.x.x` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
102 error[E0382]: use of collaterally moved value: `a.y`
103 --> $DIR/borrowck-box-insensitivity.rs:116:15
106 | -- value moved here
107 LL | //[ast]~^ value moved here
108 LL | let _y = &a.y; //[ast]~ ERROR use of collaterally moved
109 | ^^^ value used here after move
111 = note: move occurs because `a.x.x` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
113 error[E0505]: cannot move out of `a.y` because it is borrowed
114 --> $DIR/borrowck-box-insensitivity.rs:124:9
116 LL | let _x = &a.x.x;
117 | ----- borrow of `a.x.x` occurs here
118 LL | //[ast]~^ borrow of `a.x.x` occurs here
120 | ^^ move out of `a.y` occurs here
122 error[E0503]: cannot use `a.y` because it was mutably borrowed
123 --> $DIR/borrowck-box-insensitivity.rs:132:9
125 LL | let _x = &mut a.x.x;
126 | ----- borrow of `a.x.x` occurs here
127 LL | let _y = a.y; //[ast]~ ERROR cannot use
128 | ^^ use of borrowed `a.x.x`
130 error[E0505]: cannot move out of `a.y` because it is borrowed
131 --> $DIR/borrowck-box-insensitivity.rs:138:9
133 LL | let _x = &mut a.x.x;
134 | ----- borrow of `a.x.x` occurs here
136 | ^^ move out of `a.y` occurs here
138 error[E0502]: cannot borrow `a.y` as immutable because `a.x.x` is also borrowed as mutable
139 --> $DIR/borrowck-box-insensitivity.rs:147:15
141 LL | let _x = &mut a.x.x;
142 | ----- mutable borrow occurs here
143 LL | //[ast]~^ mutable borrow occurs here
144 LL | let _y = &a.y; //[ast]~ ERROR cannot borrow
145 | ^^^ immutable borrow occurs here
148 | - mutable borrow ends here
150 error[E0502]: cannot borrow `a.y` as mutable because `a.x.x` is also borrowed as immutable
151 --> $DIR/borrowck-box-insensitivity.rs:155:19
153 LL | let _x = &a.x.x;
154 | ----- immutable borrow occurs here
155 LL | //[ast]~^ immutable borrow occurs here
156 LL | let _y = &mut a.y; //[ast]~ ERROR cannot borrow
157 | ^^^ mutable borrow occurs here
160 | - immutable borrow ends here
162 error: aborting due to 16 previous errors
164 Some errors occurred: E0382, E0502, E0503, E0505.
165 For more information about an error, try `rustc --explain E0382`.