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 `&mut`
47 error[E0508]: cannot move out of type `[Box<isize>]`, a non-copy slice
48 --> $DIR/borrowck-vec-pattern-nesting.rs:46:13
53 | cannot move out of here
54 | move occurs because `vec[_]` has type `Box<isize>`, which does not implement the `Copy` trait
55 | help: consider borrowing here: `&vec[0]`
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 `&mut`
76 error[E0508]: cannot move out of type `[Box<isize>]`, a non-copy slice
77 --> $DIR/borrowck-vec-pattern-nesting.rs:65:13
82 | cannot move out of here
83 | move occurs because `vec[_]` has type `Box<isize>`, which does not implement the `Copy` trait
84 | help: consider borrowing here: `&vec[0]`
86 error[E0508]: cannot move out of type `[Box<isize>]`, a non-copy slice
87 --> $DIR/borrowck-vec-pattern-nesting.rs:74:11
90 | ^^^ cannot move out of here
92 LL | &mut [_a, _b, _c] => {}
98 | help: consider removing the `&mut`: `[_a, _b, _c]`
100 = note: move occurs because these variables have types that don't implement the `Copy` trait
102 error[E0508]: cannot move out of type `[Box<isize>]`, a non-copy slice
103 --> $DIR/borrowck-vec-pattern-nesting.rs:85:13
108 | cannot move out of here
109 | move occurs because `vec[_]` has type `Box<isize>`, which does not implement the `Copy` trait
110 | help: consider borrowing here: `&vec[0]`
112 error: aborting due to 8 previous errors
114 Some errors have detailed explanations: E0506, E0508.
115 For more information about an error, try `rustc --explain E0506`.