1 error[E0506]: cannot assign to `vec[_]` because it is borrowed
2 --> $DIR/borrowck-vec-pattern-nesting.rs:9:13
4 LL | [box ref _a, _, _] => {
5 | ------ borrow of `vec[_]` occurs here
7 LL | vec[0] = Box::new(4);
8 | ^^^^^^ assignment to borrowed `vec[_]` occurs here
11 | ------------ borrow later used here
13 error[E0506]: cannot assign to `vec[_]` because it is borrowed
14 --> $DIR/borrowck-vec-pattern-nesting.rs:23:13
16 LL | &mut [ref _b @ ..] => {
17 | ------ borrow of `vec[_]` occurs here
19 LL | vec[0] = Box::new(4);
20 | ^^^^^^ assignment to borrowed `vec[_]` occurs here
23 | ------------ borrow later used here
25 error[E0508]: cannot move out of type `[Box<isize>]`, a non-copy slice
26 --> $DIR/borrowck-vec-pattern-nesting.rs:34:11
29 | ^^^ cannot move out of here
35 | move occurs because `_a` has type `Box<isize>`, which does not implement the `Copy` trait
37 help: consider removing the mutable borrow
43 error[E0508]: cannot move out of type `[Box<isize>]`, a non-copy slice
44 --> $DIR/borrowck-vec-pattern-nesting.rs:46:13
49 | cannot move out of here
50 | move occurs because `vec[_]` has type `Box<isize>`, which does not implement the `Copy` trait
52 help: consider borrowing here
57 error[E0508]: cannot move out of type `[Box<isize>]`, a non-copy slice
58 --> $DIR/borrowck-vec-pattern-nesting.rs:55:11
61 | ^^^ cannot move out of here
67 | move occurs because `_b` has type `Box<isize>`, which does not implement the `Copy` trait
69 help: consider removing the mutable borrow
75 error[E0508]: cannot move out of type `[Box<isize>]`, a non-copy slice
76 --> $DIR/borrowck-vec-pattern-nesting.rs:65:13
81 | cannot move out of here
82 | move occurs because `vec[_]` has type `Box<isize>`, which does not implement the `Copy` trait
84 help: consider borrowing here
89 error[E0508]: cannot move out of type `[Box<isize>]`, a non-copy slice
90 --> $DIR/borrowck-vec-pattern-nesting.rs:74:11
93 | ^^^ cannot move out of here
95 LL | &mut [_a, _b, _c] => {}
96 | -- -- -- ...and here
101 = note: move occurs because these variables have types that don't implement the `Copy` trait
102 help: consider removing the mutable borrow
104 LL - &mut [_a, _b, _c] => {}
105 LL + [_a, _b, _c] => {}
108 error[E0508]: cannot move out of type `[Box<isize>]`, a non-copy slice
109 --> $DIR/borrowck-vec-pattern-nesting.rs:85:13
114 | cannot move out of here
115 | move occurs because `vec[_]` has type `Box<isize>`, which does not implement the `Copy` trait
117 help: consider borrowing here
119 LL | let a = &vec[0];
122 error: aborting due to 8 previous errors
124 Some errors have detailed explanations: E0506, E0508.
125 For more information about an error, try `rustc --explain E0506`.