|
1 |
| -error[E0507]: cannot move out of borrowed content |
2 |
| - --> $DIR/borrowck-vec-pattern-nesting.rs:42:15 |
| 1 | +error[E0506]: cannot assign to `vec[..]` because it is borrowed |
| 2 | + --> $DIR/borrowck-vec-pattern-nesting.rs:20:13 |
| 3 | + | |
| 4 | +LL | [box ref _a, _, _] => { |
| 5 | + | ------ borrow of `vec[..]` occurs here |
| 6 | +LL | //~^ borrow of `vec[..]` occurs here |
| 7 | +LL | vec[0] = box 4; //~ ERROR cannot assign |
| 8 | + | ^^^^^^ assignment to borrowed `vec[..]` occurs here |
| 9 | +LL | //~^ assignment to borrowed `vec[..]` occurs here |
| 10 | +LL | _a.use_ref(); |
| 11 | + | -- borrow later used here |
| 12 | + |
| 13 | +error[E0506]: cannot assign to `vec[..]` because it is borrowed |
| 14 | + --> $DIR/borrowck-vec-pattern-nesting.rs:33:13 |
| 15 | + | |
| 16 | +LL | &mut [ref _b..] => { |
| 17 | + | ------ borrow of `vec[..]` occurs here |
| 18 | +LL | //~^ borrow of `vec[..]` occurs here |
| 19 | +LL | vec[0] = box 4; //~ ERROR cannot assign |
| 20 | + | ^^^^^^ assignment to borrowed `vec[..]` occurs here |
| 21 | +LL | //~^ assignment to borrowed `vec[..]` occurs here |
| 22 | +LL | _b.use_ref(); |
| 23 | + | -- borrow later used here |
| 24 | + |
| 25 | +error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice |
| 26 | + --> $DIR/borrowck-vec-pattern-nesting.rs:44:15 |
3 | 27 | |
|
4 | 28 | LL | &mut [_a, //~ ERROR cannot move out
|
5 |
| - | ^^ cannot move out of borrowed content |
| 29 | + | ^^ cannot move out of here |
6 | 30 |
|
7 |
| -error[E0507]: cannot move out of borrowed content |
8 |
| - --> $DIR/borrowck-vec-pattern-nesting.rs:55:13 |
| 31 | +error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice |
| 32 | + --> $DIR/borrowck-vec-pattern-nesting.rs:57:13 |
9 | 33 | |
|
10 | 34 | LL | let a = vec[0]; //~ ERROR cannot move out
|
11 |
| - | ^^^^^^ cannot move out of borrowed content |
| 35 | + | ^^^^^^ cannot move out of here |
12 | 36 |
|
13 |
| -error[E0507]: cannot move out of borrowed content |
14 |
| - --> $DIR/borrowck-vec-pattern-nesting.rs:65:10 |
| 37 | +error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice |
| 38 | + --> $DIR/borrowck-vec-pattern-nesting.rs:67:10 |
15 | 39 | |
|
16 | 40 | LL | _b] => {}
|
17 |
| - | ^^ cannot move out of borrowed content |
| 41 | + | ^^ cannot move out of here |
18 | 42 |
|
19 |
| -error[E0507]: cannot move out of borrowed content |
20 |
| - --> $DIR/borrowck-vec-pattern-nesting.rs:68:13 |
| 43 | +error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice |
| 44 | + --> $DIR/borrowck-vec-pattern-nesting.rs:70:13 |
21 | 45 | |
|
22 | 46 | LL | let a = vec[0]; //~ ERROR cannot move out
|
23 |
| - | ^^^^^^ cannot move out of borrowed content |
| 47 | + | ^^^^^^ cannot move out of here |
24 | 48 |
|
25 |
| -error[E0507]: cannot move out of borrowed content |
26 |
| - --> $DIR/borrowck-vec-pattern-nesting.rs:76:15 |
| 49 | +error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice |
| 50 | + --> $DIR/borrowck-vec-pattern-nesting.rs:78:15 |
27 | 51 | |
|
28 | 52 | LL | &mut [_a, _b, _c] => {} //~ ERROR cannot move out
|
29 |
| - | ^^ cannot move out of borrowed content |
| 53 | + | ^^ cannot move out of here |
30 | 54 |
|
31 |
| -error[E0507]: cannot move out of borrowed content |
32 |
| - --> $DIR/borrowck-vec-pattern-nesting.rs:76:19 |
| 55 | +error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice |
| 56 | + --> $DIR/borrowck-vec-pattern-nesting.rs:78:19 |
33 | 57 | |
|
34 | 58 | LL | &mut [_a, _b, _c] => {} //~ ERROR cannot move out
|
35 |
| - | ^^ cannot move out of borrowed content |
| 59 | + | ^^ cannot move out of here |
36 | 60 |
|
37 |
| -error[E0507]: cannot move out of borrowed content |
38 |
| - --> $DIR/borrowck-vec-pattern-nesting.rs:76:23 |
| 61 | +error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice |
| 62 | + --> $DIR/borrowck-vec-pattern-nesting.rs:78:23 |
39 | 63 | |
|
40 | 64 | LL | &mut [_a, _b, _c] => {} //~ ERROR cannot move out
|
41 |
| - | ^^ cannot move out of borrowed content |
| 65 | + | ^^ cannot move out of here |
42 | 66 |
|
43 |
| -error[E0507]: cannot move out of borrowed content |
44 |
| - --> $DIR/borrowck-vec-pattern-nesting.rs:80:13 |
| 67 | +error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice |
| 68 | + --> $DIR/borrowck-vec-pattern-nesting.rs:82:13 |
45 | 69 | |
|
46 | 70 | LL | let a = vec[0]; //~ ERROR cannot move out
|
47 |
| - | ^^^^^^ cannot move out of borrowed content |
| 71 | + | ^^^^^^ cannot move out of here |
48 | 72 |
|
49 |
| -error: aborting due to 8 previous errors |
| 73 | +error: aborting due to 10 previous errors |
50 | 74 |
|
51 |
| -For more information about this error, try `rustc --explain E0507`. |
| 75 | +Some errors occurred: E0506, E0508. |
| 76 | +For more information about an error, try `rustc --explain E0506`. |
0 commit comments