error[E0382]: use of moved value: `a` --> $DIR/borrowck-box-insensitivity.rs:37:9 | LL | let _x = a.x; | -- value moved here LL | //[ast]~^ value moved here LL | let _y = a.y; //[ast]~ ERROR use of moved | ^^ value used here after move | = note: move occurs because `a.x` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0382]: use of moved value: `a` --> $DIR/borrowck-box-insensitivity.rs:46:9 | LL | let _x = a.x; | -- value moved here LL | //[ast]~^ value moved here LL | let _y = a.y; //[ast]~ ERROR use of moved | ^^ value used here after move | = note: move occurs because `a.x` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0382]: use of moved value: `a` --> $DIR/borrowck-box-insensitivity.rs:55:15 | LL | let _x = a.x; | -- value moved here LL | //[ast]~^ value moved here LL | let _y = &a.y; //[ast]~ ERROR use of moved | ^^^ value used here after move | = note: move occurs because `a.x` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0505]: cannot move out of `a.y` because it is borrowed --> $DIR/borrowck-box-insensitivity.rs:63:9 | LL | let _x = &a.x; | --- borrow of `a.x` occurs here LL | let _y = a.y; | ^^ move out of `a.y` occurs here error[E0503]: cannot use `a.y` because it was mutably borrowed --> $DIR/borrowck-box-insensitivity.rs:71:9 | LL | let _x = &mut a.x; | --- borrow of `a.x` occurs here LL | let _y = a.y; //[ast]~ ERROR cannot use | ^^ use of borrowed `a.x` error[E0505]: cannot move out of `a.y` because it is borrowed --> $DIR/borrowck-box-insensitivity.rs:77:9 | LL | let _x = &mut a.x; | --- borrow of `a.x` occurs here LL | let _y = a.y; | ^^ move out of `a.y` occurs here error[E0502]: cannot borrow `a` (via `a.y`) as immutable because `a` is also borrowed as mutable (via `a.x`) --> $DIR/borrowck-box-insensitivity.rs:85:15 | LL | let _x = &mut a.x; | --- mutable borrow occurs here (via `a.x`) LL | let _y = &a.y; //[ast]~ ERROR cannot borrow | ^^^ immutable borrow occurs here (via `a.y`) ... LL | } | - mutable borrow ends here error[E0502]: cannot borrow `a` (via `a.y`) as mutable because `a` is also borrowed as immutable (via `a.x`) --> $DIR/borrowck-box-insensitivity.rs:92:19 | LL | let _x = &a.x; | --- immutable borrow occurs here (via `a.x`) LL | let _y = &mut a.y; //[ast]~ ERROR cannot borrow | ^^^ mutable borrow occurs here (via `a.y`) ... LL | } | - immutable borrow ends here error[E0382]: use of collaterally moved value: `a.y` --> $DIR/borrowck-box-insensitivity.rs:100:9 | LL | let _x = a.x.x; | -- value moved here LL | //[ast]~^ value moved here LL | let _y = a.y; //[ast]~ ERROR use of collaterally moved | ^^ value used here after move | = note: move occurs because `a.x.x` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0382]: use of collaterally moved value: `a.y` --> $DIR/borrowck-box-insensitivity.rs:108:9 | LL | let _x = a.x.x; | -- value moved here LL | //[ast]~^ value moved here LL | let _y = a.y; //[ast]~ ERROR use of collaterally moved | ^^ value used here after move | = note: move occurs because `a.x.x` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0382]: use of collaterally moved value: `a.y` --> $DIR/borrowck-box-insensitivity.rs:116:15 | LL | let _x = a.x.x; | -- value moved here LL | //[ast]~^ value moved here LL | let _y = &a.y; //[ast]~ ERROR use of collaterally moved | ^^^ value used here after move | = note: move occurs because `a.x.x` has type `std::boxed::Box`, which does not implement the `Copy` trait error[E0505]: cannot move out of `a.y` because it is borrowed --> $DIR/borrowck-box-insensitivity.rs:124:9 | LL | let _x = &a.x.x; | ----- borrow of `a.x.x` occurs here LL | //[ast]~^ borrow of `a.x.x` occurs here LL | let _y = a.y; | ^^ move out of `a.y` occurs here error[E0503]: cannot use `a.y` because it was mutably borrowed --> $DIR/borrowck-box-insensitivity.rs:132:9 | LL | let _x = &mut a.x.x; | ----- borrow of `a.x.x` occurs here LL | let _y = a.y; //[ast]~ ERROR cannot use | ^^ use of borrowed `a.x.x` error[E0505]: cannot move out of `a.y` because it is borrowed --> $DIR/borrowck-box-insensitivity.rs:138:9 | LL | let _x = &mut a.x.x; | ----- borrow of `a.x.x` occurs here LL | let _y = a.y; | ^^ move out of `a.y` occurs here error[E0502]: cannot borrow `a.y` as immutable because `a.x.x` is also borrowed as mutable --> $DIR/borrowck-box-insensitivity.rs:147:15 | LL | let _x = &mut a.x.x; | ----- mutable borrow occurs here LL | //[ast]~^ mutable borrow occurs here LL | let _y = &a.y; //[ast]~ ERROR cannot borrow | ^^^ immutable borrow occurs here ... LL | } | - mutable borrow ends here error[E0502]: cannot borrow `a.y` as mutable because `a.x.x` is also borrowed as immutable --> $DIR/borrowck-box-insensitivity.rs:155:19 | LL | let _x = &a.x.x; | ----- immutable borrow occurs here LL | //[ast]~^ immutable borrow occurs here LL | let _y = &mut a.y; //[ast]~ ERROR cannot borrow | ^^^ mutable borrow occurs here ... LL | } | - immutable borrow ends here error: aborting due to 16 previous errors Some errors occurred: E0382, E0502, E0503, E0505. For more information about an error, try `rustc --explain E0382`.